Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

natkass/Clean-amharic-sentenses

Domain:

natural language processing
Creator:
nat
Host:
Count all sentences that only contain amharic characters from files in a folder and write all pure amharic sentences to a file # Clean-amharic-sentenses This Python code reads the contents of all files in a specified directory, filters out sentences that contain special characters other than Amharic letters and digits, and writes the filtered contents to a new file called "output.txt". It also prints the total number of sentences that are written in pure Amharic. The code uses the os module to get the list of files in the directory, and the re module to match Amharic letters and special characters. It sets a regular expression pattern to match Amharic letters and checks each sentence in the contents of the file against this pattern using re.search(). If a sentence contains any special characters that are not Amharic letters or digits, it is not added to the filtered list of sentences. The filtered sentences are then joined into a single string and written to a new file called "output.txt" using the open() function with write mode ("w") and UTF-8 encoding. The code also prints the total number of sentences that are written in pure Amharic, which is incremented each time a sentence is added to the filtered list. Overall, this code can be used to extract pure Amharic text from a set of files and write it to a new file. However, it assumes that the files are encoded in UTF-8 and that sentences are separated by periods. Additionally, it does not perform any linguistic analysis to ensure that the filtered sentences are grammatically correct or meaningful.

Visit

github.com

Languages

Amharic

Similar

yosefw/amharic-retrieval-dataset-cleanyosefw/amharic-retrieval-dataset-clean-v2Clean Team GhanaBlessingALETI/Clean-Togobankolejohn/clean-ekitiDeoJered/Clean-Rwanda-

yosefw/amharic-retrieval-dataset-clean

yosefw/amharic-retrieval-dataset-clean-v2

Clean Team Ghana

Evaluation of Container-Based Sanitation

BlessingALETI/Clean-Togo

Clean Togo Plateforme intelligente de gestion des déchets ménagers Description Clean Togo est une

bankolejohn/clean-ekiti

# CleanEkiti MVP A community-driven platform for reporting environmental issues in Ekiti State, Nig

DeoJered/Clean-Rwanda-

Clean Rwanda is a web application designed to help Rwandan communities manage waste more effectively