Answers.Body: <p>If you only need the vector space as a way to obtain a similarity measure, you may want to consider a distance measure instead. Similarity and distance are inversely related: identical words have maximum similarity or zero distance, and as the similarity decreases, the distance increases. </p>
  
  <p>For instance, the <a href="https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm" rel="nofollow noreferrer">Wagner-Fischer algorithm</a> computes the edit distance between two strings of characters. This edit distance takes into acccount insertions and deletions, as in your examples, but also substitutions (for example "gray" vs. "grey").</p>
  
  <p>The article linked above includes pseudocode that should translate easily to actual code.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T13:47:15.190Z
Answers.Text: How is the edit distance related to the actual problem? I think you should spend a few words to argue the usefulness of your suggestion with respect to the actual problem.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T14:05:06.647Z
Answers.Text: Not sure whether you mean relationship between edit distance and similarity or wrt vector space.
Answers.UserDisplayName: Jaume Oliver Lafont
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T14:25:24.037Z
Answers.Text: How does the edit distance relate to e.g. pronunciation?
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-19T06:07:03.200Z
Answers.Text: The edit distance on raw text measures spelling differences. To measure pronunciation differences we need some phonetic transcription of the text. It seems that distinct measures are needed, to deal properly with homophones ( https://en.wikipedia.org/wiki/Homophone)
Answers.UserDisplayName: Jaume Oliver Lafont
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-18T06:39:53.837Z
Answers.LastActivityDate: 2019-04-18T14:17:47.110Z
Answers.LastEditDate: 2019-04-18T14:17:47.110Z
Answers.UserDisplayName: Jaume Oliver Lafont
Body: <p>In natural language processing, we can convert words to vectors (or word embeddings). In this vector space, we can measure the similarity between these word embeddings.</p>
  
  <p>How can we create a vector space where word spelling and pronunciation can be easily compared? For example, "apple" and "ape", "start" and "startle" are very similar, so they should also be similar in this new vector space.</p>
  
  <p>I am eventually looking for a library that can do this out of the box. I would like to avoid implementing this myself.</p>
  
Tags: <natural-language-processing><word-embedding>
Title: How can we create a vector space where word spelling and pronunciation can be easily compared?
UserDisplayName: gloomyson
ThreadText: # How can we create a vector space where word spelling and pronunciation can be easily compared?
  
  (Asked by: username_0 on 2019-04-15)
  
  In natural language processing, we can convert words to vectors (or word embeddings). In this vector space, we can measure the similarity between these word embeddings.
  
  How can we create a vector space where word spelling and pronunciation can be easily compared? For example, "apple" and "ape", "start" and "startle" are very similar, so they should also be similar in this new vector space.
  
  I am eventually looking for a library that can do this out of the box. I would like to avoid implementing this myself.
  
  **Tags:** natural-language-processing, word-embedding
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-18. Score: 1
  
  If you only need the vector space as a way to obtain a similarity measure, you may want to consider a distance measure instead. Similarity and distance are inversely related: identical words have maximum similarity or zero distance, and as the similarity decreases, the distance increases.
  
  For instance, the [Wagner-Fischer algorithm](https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm) computes the edit distance between two strings of characters. This edit distance takes into acccount insertions and deletions, as in your examples, but also substitutions (for example "gray" vs. "grey").
  
  The article linked above includes pseudocode that should translate easily to actual code.
  
  > **Comments:**
  > **username_2**: How is the edit distance related to the actual problem? I think you should spend a few words to argue the usefulness of your suggestion with respect to the actual problem.  
  > **username_1**: Not sure whether you mean relationship between edit distance and similarity or wrt vector space.  
  > **username_2**: How does the edit distance relate to e.g. pronunciation?  
  > **username_1**: The edit distance on raw text measures spelling differences. To measure pronunciation differences we need some phonetic transcription of the text. It seems that distinct measures are needed, to deal properly with homophones ( https://en.wikipedia.org/wiki/Homophone)  
  
  ---
  
  