LangDetect 什么是配置文件?
LangDetect what is profile?
我目前正在搜索如何识别推文语言。我找到了 apache library tika 但它不能很好地工作......
现在,我找到了 langdetect,我正在尝试使用它。
目前,我找到了一个代码示例,但我不明白文件是什么"profiles"...我不知道我需要在里面放什么...
String path = "my path to the file profiles";
DetectorFactory.loadProfile(path);
detector = DetectorFactory.create();
detector.append(tweet);
langDetected = detector.detect();
Before using this library, call DetectorFactory#loadProfile()
once to initialize.
DetectorFactory.loadProfile(profileDirectory);
The parameter of this method is a directory which has files of language profiles. The language profiles are bundled with this library, so specify "trunk/profile"
in repository as the parameter of loadProfile()
.
配置文件位于 profiles
subdirectory
的存储库中
我目前正在搜索如何识别推文语言。我找到了 apache library tika 但它不能很好地工作...... 现在,我找到了 langdetect,我正在尝试使用它。 目前,我找到了一个代码示例,但我不明白文件是什么"profiles"...我不知道我需要在里面放什么...
String path = "my path to the file profiles";
DetectorFactory.loadProfile(path);
detector = DetectorFactory.create();
detector.append(tweet);
langDetected = detector.detect();
Before using this library, call
DetectorFactory#loadProfile()
once to initialize.
DetectorFactory.loadProfile(profileDirectory);
The parameter of this method is a directory which has files of language profiles. The language profiles are bundled with this library, so specify"trunk/profile"
in repository as the parameter ofloadProfile()
.
配置文件位于 profiles
subdirectory