What is Indra?
Indra is an efficient library and service to deliver word-embeddings and semantic relatedness to real-world applications in the domains of machine learning and natural language processing. It offers 60+ pre-build models in 15 languages and several model algorithms and corpora.
Indra is powered by spotify-annoy delivering an efficient approximate nearest neighbors function.
Features
- Efficient approximate nearest neighbors (powered by spotify-annoy);
- 60+ pre-build models in 15 languages;
- Permissive license for commercial use (MIT License);
- Support to translated distributional relatedness;
- Easy deploy: Deploy the infrastructure in 3 steps;
- Access to the semantic models as a service;
- Supports multiple distributional semantic models and distance measures.
Pre-build Models
Indra delivers ready-to-use pre-build models using different algorithms, data set corpora and languages. For a full list of pre-build models, please check the Wiki.
Model Algorithms
- Word2Vec (W2V)
- Global Vectors (GloVe)
- Explicit Semantic Analysis (ESA)
- Dependency-Based Word Embeddings
- Latent Semantic Analysis (LSA)
Supported Languages
- EN - English
- DE - German
- ES - Spanish
- FR - French
- PT - Portuguese
- IT - Italian
- SV - Swedish
- ZH - Chinese
- NL - Dutch
- RU - Russian
- KO - Korean
- JA - Japanese
- AR - Arabic
- FA - Persian
- EL - Greek
Install
To install, please use the 3-step tool IndraComposed.
Getting Started
This guide provides the basic instructions to get you started using Indra. For further details, including the response format, additional parameters and the list of available models and language, please check the Wiki.
(POST /vectors)
Requesting Word Embeddings {
"corpus": "googlenews",
"model": "W2V",
"language": "EN",
"terms": ["love", "mother", "santa claus"]
}
For further details, check the Word Embeddings documentation.
(POST /neighbors/vectors)
Requesting Nearest Neighbors Vectors {
"corpus": "googlenews",
"model": "W2V",
"language": "EN",
"topk": 10,
"terms": ["love", "mother", "santa"]
}
For further details, check the Nearest Neighbors documentation.
(POST /neighbors/relatedness)
Requesting Nearest Neighbors Relatedness {
"corpus": "googlenews",
"model": "W2V",
"language": "EN",
"topk": 10,
"scoreFunction": "COSINE",
"terms": ["love", "mother", "santa"]
}
For further details, check the Nearest Neighbors documentation.
(POST /relatedness)
Requesting Semantic Similarity (Pair of Terms) {
"corpus": "wiki-2018",
"model": "W2V",
"language": "EN",
"scoreFunction": "COSINE",
"pairs": [{
"t2": "love",
"t1": "mother"
},
{
"t2": "love",
"t1": "santa claus"
}]
}
For further details, check the Semantic Similarity documentation.
(POST /relatedness/otm)
Requesting Semantic Similarity (One-to-Many) {
"corpus": "wiki-2018",
"model": "W2V",
"language": "EN",
"scoreFunction": "COSINE",
"one" : "love",
"many" : ["mother", "father", "child"]
}
For further details, check the Semantic Similarity documentation.
Translated Word Embeddings and Semantic Similarity
For translated word embeddings and translated semantic similarity just append "mt" : true in the JSON payload.
Public Endpoint
We have a public endpoint for demonstration only hence you can try right now with cURL on the command line.
For word embeddings:
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"
For semantic similarity:
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"
Citing Indra
Please cite Indra, if you use it in your experiments or project.
@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)},
}
Contributors (alphabetical order)
- Andre Freitas
- Brian Davis
- Juliano Sales
- Leonardo Souza
- Siamak Barzegar
- Siegfried Handschuh