ahmetaa / zemberek-nlp

NLP tools for Turkish.
Other
1.14k stars 207 forks source link

Zemberek with R #219

Open ArwaElsadig17 opened 5 years ago

ArwaElsadig17 commented 5 years ago

Good Day Sir,

I am a student trying to use zemberek with R to analyze Turkish comments, and I'am new to zemberek , I have download Zemberek 0.15 JAR file but i cant call the classes . Is it possible to use it threw R and is there any documentation to help me to find what classes and what functions to use.

Best Regards. Arwa

mezig351 commented 5 years ago

I think if you need names of classes, you can look at the examples codes. For instance the classes that are used in the SimpleClassification (zemberek-nlp.examples.src.main.java.zemberek.examples.classification.SimpleClassification.java) example are:

import zemberek.classification.FastTextClassifier; import zemberek.core.ScoredItem; import zemberek.core.turkish.Turkish; import zemberek.tokenization.TurkishTokenizer;

If you have some sort of java-to-R class converter that you are using, I believe the import statements have the class names that you need. I was trying to do the same thing with Python, there is a library called jpype, and I found some example code that helped me here: https://github.com/ozturkberkay/Zemberek-Python-Examples/blob/master/examples/morphology/stem-and-lemmatize/standard_morphology.py

Hope this helps