-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding words to lexicon #188
Comments
simplest way is to get a handle to lexicon's let lexData = RiTa.lexicon().data;
lexData["palpate"] = ["p-ae1-l p-ey1-t", "vb"]; or if you have multiple additons: let toAdd = {
'palpate': ["p-ae1-l p-ey1-t", "vb"],
'wadly': ['w-ae1-d l-iy', 'rb']
}
let lexData = RiTa.lexicon().data;
Object.keys(toAdd).forEach(w => lexData[w] = toAdd[w]); Alternatively, if you think these should be words in the default RiTa lexicon, then please submit a PR with your additions to this file: https://github.com/dhowe/ritajs/blob/master/src/rita_dict.js |
Thank you - that completely answers my question. |
You can try this tool: http://www.speech.cs.cmu.edu/tools/lextool.html Note that here is a tradeoff between package-size and lexicon coverage. We are often trying to reduce the size of the lexicon, rather than increase it. And I'm not sure average users would need medical terms. Perhaps we can publish this a sort of add-on or plugin ? |
How can I add words to the lexicon?
Apologies if this is 1)in the docs or 2)obvious or 3)obviously not within scope
Do I just edit rita.js, for example adding "palpate"
just embed
palpate: ["p-ae1-l p-ey1-t", "vb"]
into the word map?
with thanks
The text was updated successfully, but these errors were encountered: