文件名称:wmd-relax:快速计算移词器的距离
文件大小:59KB
文件格式:ZIP
更新时间:2024-05-03 06:36:06
Python
快速词移动器的距离 根据Matt Kusner,Yu Sun,Nicholas Kolkin和Kilian Weinberger的《的描述计算移词器的距离。 高级逻辑是用Python编写的,与线性编程相关的低级功能已卸载到捆绑的本机扩展中。 可以将本机扩展构建为根本不与Python相关的通用共享库。 不支持Python 2.7和更早版本。 繁琐的工作由。 安装 pip3 install wmd 在Linux和macOS上测试。 用法 您应该具有embeddings numpy数组和nbow模型-也就是说,每个样本都是一组加权项目,并且每个项目都是嵌入式的。 import numpy from wmd import WMD embeddings = numpy . array ([[ 0.1 , 1 ], [ 1 , 0.1 ]], dtype = numpy . float32 )
【文件预览】:
wmd-relax-master
----setup.py(2KB)
----.gitignore(545B)
----MAINTAINERS(52B)
----or-tools()
----LICENSE.md(10KB)
----.travis.yml(573B)
----MANIFEST.in(470B)
----cache.h(2KB)
----CONTRIBUTING.md(3KB)
----CODE_OF_CONDUCT.md(3KB)
----python.cc(8KB)
----doc()
--------Makefile(658B)
--------index.rst(570B)
--------conf.py(5KB)
--------_static()
--------wmd.png(25KB)
--------Doxyfile(240B)
--------make.bat(807B)
--------README.md(562B)
----.gitmodules(85B)
----emd_relaxed.h(2KB)
----README.md(3KB)
----emd.h(7KB)
----test.py(5KB)
----wmd()
--------__init__.py(27KB)
----spacy_example.py(1KB)
----DCO(1KB)
----CMakeLists.txt(2KB)