Skip to content
Snippets Groups Projects
Commit e030c1a2 authored by simon devauchelle's avatar simon devauchelle
Browse files

No oovs keywords + removing ina corpus references

parent 9feaabf5
No related branches found
No related tags found
No related merge requests found
......@@ -76,11 +76,10 @@ end
"""
MFAFRDICT(path)
Return the french dictionary of pronunciation as provided by MFA (french_mfa v2.0.0a) with OOVs words
generated by G2P model (french_mfa) on INA Diachronic Corpus.
Return the french dictionary of pronunciation as provided by MFA (french_mfa v2.0.0a)
"""
function MFAFRDICT(path; oovs="")
function MFAFRDICT(path)
if ! isfile(path)
mkpath(dirname(path))
dir = mktempdir()
......@@ -96,17 +95,5 @@ function MFAFRDICT(path; oovs="")
lexicon[word] = prononciations
end
end
# Add out-of-vocabulary words
if isfile(oovs)
open(oovs, "r") do o
for line in eachline(o)
word, pron... = split(line)
prononciations = get(lexicon, word, [])
push!(prononciations, pron)
lexicon[word] = prononciations
end
end
end
lexicon
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment