Indra
2.2.0-rc8
Indra 是一个高效的库和服务,可为机器学习和自然语言处理领域的实际应用程序提供词嵌入和语义相关性。它提供 15 种语言的 60 多个预构建模型以及多种模型算法和语料库。
Indra 由 Spotify-annoy 提供支持,提供高效的近似最近邻函数。
Indra 使用不同的算法、数据集语料库和语言提供即用型预构建模型。有关预构建模型的完整列表,请查看 Wiki。
要安装,请使用 3 步工具 IndraCompished。
本指南提供了开始使用 Indra 的基本说明。有关更多详细信息,包括响应格式、附加参数以及可用模型和语言的列表,请查看 Wiki。
(POST /vectors)
{
"corpus" : " googlenews " ,
"model" : " W2V " ,
"language" : " EN " ,
"terms" : [ " love " , " mother " , " santa claus " ]
}
有关更多详细信息,请查看词嵌入文档。
(POST /neighbors/vectors)
{
"corpus" : " googlenews " ,
"model" : " W2V " ,
"language" : " EN " ,
"topk" : 10 ,
"terms" : [ " love " , " mother " , " santa " ]
}
有关更多详细信息,请查看最近邻居文档。
(POST /neighbors/relatedness)
{
"corpus" : " googlenews " ,
"model" : " W2V " ,
"language" : " EN " ,
"topk" : 10 ,
"scoreFunction" : " COSINE " ,
"terms" : [ " love " , " mother " , " santa " ]
}
有关更多详细信息,请查看最近邻居文档。
(POST /relatedness)
{
"corpus" : " wiki-2018 " ,
"model" : " W2V " ,
"language" : " EN " ,
"scoreFunction" : " COSINE " ,
"pairs" : [{
"t2" : " love " ,
"t1" : " mother "
},
{
"t2" : " love " ,
"t1" : " santa claus "
}]
}
有关更多详细信息,请查看语义相似性文档。
(POST /relatedness/otm)
{
"corpus" : " wiki-2018 " ,
"model" : " W2V " ,
"language" : " EN " ,
"scoreFunction" : " COSINE " ,
"one" : " love " ,
"many" : [ " mother " , " father " , " child " ]
}
有关更多详细信息,请查看语义相似性文档。
对于翻译后的词嵌入和翻译后的语义相似性,只需在 JSON 负载中附加"mt" : true即可。
我们有一个仅用于演示的公共端点,因此您现在可以在命令行上使用cURL进行尝试。
curl -X POST -H "Content-Type: application/json" -d '{
"corpus": "wiki-2018",
"model": "W2V",
"language": "EN",
"terms": ["love", "mother", "santa claus"]
}' "http://indra.lambda3.org/vectors"
curl -X POST -H "Content-Type: application/json" -d '{
"corpus": "wiki-2018",
"model": "W2V",
"language": "EN",
"scoreFunction": "COSINE",
"pairs": [{
"t2": "love",
"t1": "mother"
},
{
"t2": "love",
"t1": "santa claus"
}]
}' "http://indra.lambda3.org/relatedness"
如果您在实验或项目中使用 Indra,请引用它。
@InProceedings{indra,
author="Sales, Juliano Efson and Souza, Leonardo and Barzegar, Siamak and Davis, Brian and Freitas, Andr{ ' e} and Handschuh, Siegfried",
title="Indra: A Word Embedding and Semantic Relatedness Server",
booktitle = {Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018)},
month = {May},
year = {2018},
address = {Miyazaki, Japan},
publisher = {European Language Resources Association (ELRA)},
}