Problem running methods in .jar files

조회 수: 3 (최근 30일)
Mehmet OZC
Mehmet OZC 2020년 1월 7일
편집: Mehmet OZC 2020년 1월 8일
There is a .jar file (https://github.com/ahmetaa/zemberek-nlp) called "zemberek" which is a Natural Language Processing tools for Turkish language.
I have downloaded 0.17.1 jar file and added to the path
>> cd(prefdir)
>> edit javaaddpath.txt
Added the jar file path to the text, saved, closed and restarted MATLAB.
Then I import tokenizer and listed the methods as follow
>> import zemberek.tokenization.TurkishTokenizer
>> methods TurkishTokenizer
Methods for class TurkishTokenizer:
builder isTypeIgnored
convert notify
convertType notifyAll
equals toString
getClass tokenize
getTokenIterator tokenizeToStrings
hashCode wait
isTypeAccepted
>>
however I cannot run any methods listed above.
>> TurkishTokenizer.tokenize("kalemlerim")
No method 'tokenize' with matching signature found for class 'zemberek.tokenization.TurkishTokenizer'.

채택된 답변

Steven Lord
Steven Lord 2020년 1월 7일
Check whether or not the tokenize method of the TurkishTokenizer class is static (whether the Qualifiers column of the window opened by the following command lists "static")
methodsview zemberek.tokenization.TurkishTokenizer
If it's not it requires an instance of the class as input. From the examples in the Usage section on the GitHub page I believe it is not static. If that's the case try something like:
>> import zemberek.tokenization.TurkishTokenizer
>> TT = TurkishTokenizer.DEFAULT;
>> TT.tokenize("kalemlerim")

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by