Analogy-0.1
توضیحات
Experimental Open-source Natural Language Processing project for similiarity and difference retrieval
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Analogy-0.1 |
| نام | Analogy |
| نسخه کتابخانه | 0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jim Macwan |
| ایمیل نویسنده | jimmacwan94@gmail.com |
| آدرس صفحه اصلی | https://github.com/jmacwan/Analogy |
| آدرس اینترنتی | https://pypi.org/project/Analogy/ |
| مجوز | - |
Analogy is an experimental open source project for Natural Language Processing. It aims to perform 2 newly introduced NLP tasks: word comparison and sentence comparison.
Analogy provides semantic similiarity and differences between two pieces of text. Text can be in the form of a word or a sentence.
A pretrained model is released to get started. You can also retrain upon an existing model.
Getting Started:
Prerequisites:
Python 3.0 or higher
Stanford Core NLP (3.9.2)
Installing:
pip install analogy
Read instructions on how to install and run stanford corenlp server.
Analogy functions:
1. findComparison(model, word1, word2)
2. findSentenceComparison(model, sentence1, sentence2)
3. trainModel(sentences) #Input is list of sentences
4. retrainModel(model, sentences)
5. saveModel(name, model) #Be sure to add '.npz' at last
6. loadModel(name)
Example:
findComparison(model, "apple", "orange")
Output:
Word1 = apple
Word2 = orange
Similiarity = fruit
نیازمندی
| مقدار | نام |
|---|---|
| - | pycorenlp |
| - | numpy |
نحوه نصب
نصب پکیج whl Analogy-0.1:
pip install Analogy-0.1.whl
نصب پکیج tar.gz Analogy-0.1:
pip install Analogy-0.1.tar.gz