语言识别工具包

lidtk的Python项目详细描述


DOIPyPI versionPython SupportBuild StatusCode style: blackGitHub last commitGitHub commits since latest release (by SemVer)CodeFactor

lidtk公司

语言识别工具包lidtk是为了 调查语言表现的现状。在

安装

建议安装clana的方法是:

$ pip install lidtk --user

如果需要最新版本:

^{pr2}$

我建议您使用WiLI-2018 dataset。在

使用

$ lidtk --help

Usage: lidtk [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  analyze-data           Utility function for the languages...
  analyze-unicode-block  Analyze how important a Unicode block is for...
  char-distrib           Use the character distribution language...
  cld2                   Use the CLD-2 language classifier.
  create-dataset         Create sharable dataset from downloaded...
  download               Download 1000 documents of each language.
  google-cloud           Use the CLD-2 language classifier.
  langdetect             Use the langdetect language classifier.
  langid                 Use the langid language classifier.
  map                    Map predictions to something known by WiLI
  nn                     Use a neural network classifier.
  textcat                Use the CLD-2 language classifier.
  tfidf_nn               Use the TfidfNNClassifier classifier.

例如:

$ lidtk cld2 predict --text 'This is a test.'
eng

通常的顺序是:

  1. lidtk download:请使用WiLI-2018,而不是自己下载数据集。在
  2. lidtk create-dataset:如果使用WiLI-2018,则可以跳过此步骤
  3. lidtk analyze-unicode-block --start 0 --end 128
  4. lidtk tfidf_nn train vectorizer --config lidtk/classifiers/config/tfidf_nn.yaml
  5. lidtk tfidf_nn train vectorizer --config lidtk/classifiers/config/tfidf_nn.yaml
  6. lidtk tfidf_nn wili --config lidtk/classifiers/config/tfidf_nn.yaml

或者直接使用:

$ lidtk cld2 predict --text 'This text is written in some language.'

eng

发展

使用tox检查测试。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spring引导jar文件可重用(本地maven存储库)   没有标题的java Webpush通知不会出现   本地类的优先级。java文件还是从java包中导入的类?   java Sparks enableHiveSupport   java通过AJAX调用我的WebService通常会导致服务器故障   java添加到链表末尾   java提供了对Spring数据Mongo存储库的限制   仅显示字符的程序显示“?”在爪哇   java Oracle 10.2.0.4.0和OJDBC1212。1.0.0.jar | |无法获取JDBC连接;嵌套的异常是ja│ │ ORA01882:未找到时区区域   使用Netflix Eureka的java JSONException   java我们如何为akka非类型处理器编写单元测试   java 安卓在触摸和移动时获取按钮文本   java将字符串转换为int数组bluej