I am trying to find words that are similar to two different words. I know that I can find the most similar word with FastText but I was wondering if there is a way to find a keyword that is similar to two keywords. For example, "apple" is similar to "orange" and also similar to "kiwi". So, what I want to do is if I have two words, "organ" and "kiwi", then I would like to get a suggestion of the keyword "apple" or any other fruits. Is there a way to do this?
How to find word that are similar to two keywords using FastText?
721 Views Asked by Brian Lee At
2
There are 2 best solutions below
0
wishiknew
On
I have used the Gensim W2V implementation for such computations for years now, but Gensim has also FastText implementation: https://radimrehurek.com/gensim/models/fasttext.html
Related Questions in NLP
- command line parameter in word2vec
- Annotator dependencies: UIMA Type Capabilities?
- term frequency over time: how to plot +200 graphs in one plot with Python/pandas/matplotlib?
- Stanford Entity Recognizer (caseless) in Python Nltk
- How to interpret scikit's learn confusion matrix and classification report?
- Detect (predefined) topics in natural text
- Amazon Machine Learning for sentiment analysis
- How to Train an Input File containing lines of text in NLTK Python
- What exactly is the difference between AnalysisEngine and CAS Consumer?
- keywords in NEGATIVE Sentiment using sentiment Analysis(stanfordNLP)
- MaxEnt classifier implementation in java for linguistic features?
- Are word-vector orientations universal?
- Stanford Parser - Factored model and PCFG
- Training a Custom Model using Java Code - Stanford NER
- Topic or Tag suggestion algorithm
Related Questions in GENSIM
- How to save gensim LDA topics output to csv along with the scores?
- Gensim LDA - Default number of iterations
- LDA generated topics
- Do I need to transform unseen documents before projecting them onto model topics?
- top_topics Gensim NameError: global name 'np' is not defined
- Fitting LDA to corpus in LDA-C format in gensim
- LDA Results Errors
- AttributeError: 'numpy.ndarray' object has no attribute 'A'
- Gensim with MinGW
- ValueError: setting an array element with a sequence. Scikit learn
- Access key value pairs in gensim dictionary
- Word2vec training using gensim starts swapping after 100K sentences
- KeyError: “word 'word' not in vocabulary” in word2vec
- gensim on EC2: installation issue
- Gensim Doc2Vec Exception AttributeError: 'str' object has no attribute 'words'
Related Questions in WORD2VEC
- command line parameter in word2vec
- Are word-vector orientations universal?
- How can a sentence or a document be converted to a vector?
- semantic matching strings - using word2vec or s-match?
- How to apply word2vec on images?
- Word2vec training using gensim starts swapping after 100K sentences
- KeyError: “word 'word' not in vocabulary” in word2vec
- how to find similar words for a certain word in tensorflow_word2vec like using model.most_similar in gensim?
- Gensim Doc2Vec Exception AttributeError: 'str' object has no attribute 'words'
- How to use glove pretrained vectors to find similarity between two words and later in two documnets?
- AttributeError: module 'tensorflow.models.embedding.gen_word2vec' has no attribute 'skipgram_word2vec'
- TensorFlow : How and where to specify save path in word2vec?
- gen_word2vec in tensorflow is not found
- Gensim Word2Vec model: Cut dimensions
- UnicodeDecodeError: 'ascii' codec can't decode, with gensim, python3.5
Related Questions in FASTTEXT
- Gcc Error Trying to PIP Install Fasttext Redhat (Amazon ec2)
- FastText - Cannot load model.bin due to C++ extension failed to allocate the memory
- train word2vec with pretrained vectors
- precision and recall in fastText?
- fine tuning pre-trained word2vec Google News
- What is the input format of fastText and why does my model doesn't give me a meaningful similar output?
- problem saving pre-trained fasttext vectors in "word2vec" format with _save_word2vec_format()
- Incorporate fasttext vectors in tf.keras embedding layer?
- SPACY - Confusion about word vectors and tok2vec
- why seq2seq model return negative loss if I used a pre-trained embedding model
- fastText test_label shows recall as nan for all labels in text classification
- Fasttext model load time
- Mocking FastText model for utest
- Makefile error for fastText on windows - make (e=2)
- How to decide correct NLP approach for a project
Related Questions in CONCEPTNET
- Query by association in Conceptnet
- Why is ConceptNet Numberbatch word embedding giving poor results for analogy queries?
- How to find word that are similar to two keywords using FastText?
- Which is better? OpenCyc or ConceptNet?
- How to disambiguate words in Conceptnet
- Using ConceptNet5 API to calculate the similarity between texts
- ConceptNet 5.5 and JSON format
- ConceptNet RelatedTo Tuning
- ConceptNet: simple query locally
- ConceptNet Database Connectivity with Java
- Conceptnet Numberbatch (multilingual) OOV words
- List characteristics relevant to a noun
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I think that there isn't out of the box function for this feature.
In any case, you can think about this simple approach:
A small note: this is a crude approach. If necessary, even more sophisticated operations can be performed using the similarity cosine.
Code example:
Example output (in Italian):