Problem running methods in .jar files

2 ビュー (過去 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")
  1 件のコメント
Mehmet OZC
Mehmet OZC 2020 年 1 月 7 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by