https://github.com/mosesab/corpus-based-synonym-finder
Finds the synonym of words in a language using a language corpus
https://github.com/mosesab/corpus-based-synonym-finder
corpus-analysis languages natural-language-processing nlp synonyms text-processing
Last synced: about 2 months ago
JSON representation
Finds the synonym of words in a language using a language corpus
- Host: GitHub
- URL: https://github.com/mosesab/corpus-based-synonym-finder
- Owner: mosesab
- License: mit
- Created: 2021-08-01T00:43:55.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-26T22:41:14.000Z (almost 5 years ago)
- Last Synced: 2025-02-28T14:08:58.381Z (over 1 year ago)
- Topics: corpus-analysis, languages, natural-language-processing, nlp, synonyms, text-processing
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE
Awesome Lists containing this project
README
# Corpus-based-synonym-finder ReadMe
[](#)
### ๐ฉโ๐ป Project BreakDown
The Corpus-based Synonym Finder illustrates a principle of Natural Language Processing, it shows that a computer can estimate the meaning
of words in a language without an inherent understanding of that language.
### ๐ฆ How the Code Works
* The code works by searching for how the target word is used in a sentence,
* The code finds other words (synonyms) that were used in similar context,
* The accuracy and speed of execution of the synonym finder code is dependent on the size of the corpus file.
### ๐งช How to Run the Code
The synonym*finder.py is the python file that should be run when testing the code.
For the code to run ensure that the corpus text file is in the same folder as the code.
### ๐ How To change the Corpus-based Synonym Finder's language:
1. Move a corpus text file of the language of choice into the Synonym Finder Folder
2. Feed the corpus_words_txt (around line 235) variable the name of the corpus(must include .txt)
3. Note that the larger the corpus word count,the higher the accuracy and the slower the speed of execution
### ๐ Note
- The create_sentence_list function splits the whole corpus into sentences ,it is computationally expensive especially for very large
corpus. Using a database to index the sentences in a corpus could speed up code execution.
### ๐ก Language Requirements
The language used for this project was Yoruba but the code supports any language at all as long as a few conditions are met
* The characters of the language exists in python's character map.
* The language uses . (dot / full stop) to denote the end of a sentence.
### ๐ Author
Moses Bankole