Skip to content

Commit

Permalink
english
Browse files Browse the repository at this point in the history
  • Loading branch information
neurlang authored and Your Name committed Oct 6, 2024
1 parent c3df62c commit 835f99b
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 136 deletions.
2 changes: 1 addition & 1 deletion dicts/dicts.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func GetDict(lang, filename string) ([]byte, error) {
case "Farsi":
return farsi.Language.ReadFile(filename)
case "English":
return english.Language.ReadFile(filename)
return english.Language.ReadFile(lzw(filename))
case "German":
return german.Language.ReadFile(filename)
case "French":
Expand Down
2 changes: 1 addition & 1 deletion dicts/english/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package english

import "embed"

//go:embed *.tsv language.json weights0.json.gz
//go:embed *.tsv language.json weights1.json.lzw
var Language embed.FS
213 changes: 79 additions & 134 deletions dicts/english/language.json
Original file line number Diff line number Diff line change
@@ -1,135 +1,80 @@
{
"Map": {"'s":["z","s","ɪz"],
"a":["æ","ə","","ɑ","ɛ","ɔ","ʌ","ɚ"],
"ae":[""],
"ah":["ə"],
"al":["əl","ɔ","ɑ","æ"],
"all":["əl"],
"an":["ən","æ","ɑ"],
"ane":["ən"],
"ann":["ən","æ"],
"ao":[""],
"ar":["ɚ","ɛ","ɑ"],
"au":["ɔ",""],
"aw":["ɔ"],
"ay":[""],
"aye":[""],
"b":["b"],
"bb":["b"],
"bbe":["b"],
"be":["b"],
"c":["k","s",""],
"ce":["s"],
"ch":["","k"],
"che":[""],
"ck":["k"],
"cke":["k"],
"cs":["ks"],
"d":["d",""],
"dd":["d"],
"de":["d","n"],
"dge":[""],
"e":["ɛ","i","ɹ","ɪ","ə",""],
"ee":["i"],
"er":["ɚ"],
"ey":["i"],
"f":["f"],
"fe":["f"],
"ff":["f"],
"ffe":["f"],
"g":["g","ŋ",""],
"ge":[""],
"gg":["g"],
"gge":["g"],
"gh":["g"],
"gs":["gz"],
"gue":["g"],
"h":["h"],
"i":["ɪ","","i","ɹ"],
"ia":["","i"],
"ie":["i"],
"in":["ɪ","ɪn","","i"],
"ine":["ɪn"],
"inn":["ɪn"],
"ir":["ɹ","ɪ"],
"ire":["ɹ"],
"j":[""],
"k":["k","ŋ"],
"ke":["k"],
"l":["l","ɛ"],
"le":["əl","l","li"],
"lee":["li"],
"ley":["li"],
"li":["","li","l"],
"lie":["li"],
"ll":["l","ɛ"],
"lle":["l"],
"ly":["li"],
"m":["m"],
"mb":["m"],
"me":["m"],
"mm":["m"],
"mme":["m"],
"n":["n","ən","ɛn","ŋ"],
"ne":["n"],
"ng":["ŋ","ɪ"],
"nn":["n"],
"o":["","ɑ","ɔ","ə","ʌ","u","ʊ",""],
"oe":[""],
"oh":[""],
"om":["əm","ɑ",""],
"omb":["əm"],
"on":["ən","ɑ",""],
"oo":["u"],
"or":["ɚ","ɔ"],
"ou":["","u"],
"ow":[""],
"owe":[""],
"p":["p"],
"pe":["p"],
"pp":["p"],
"ppe":["p"],
"q":["k"],
{"Map":{"":[],
"'":["ʊ"],
"'s":["z","s","ʊ","ɪ"],
"a":["ə","ˈæ","ˈɑ","æ","ɑ","ˌæ","ˈe","ɪ","ˈɛ","e","ˌɑ","ɔ","ˌe","ˈɔ","ɑː","t","ˌɛ","ʊ","ɛ","ˈi","ˈa","a","ɒ","ˌa","d","ˌɔ","l","ɹ"],
"ar":["ɑː","ɚˈ","ˈɑɹ","ˈɛ","ɚ","ɑɹ","ɑɹˈ","ˈɛɹ","ˈɑ","ˌɑɹ","ɑ","æɹ","e","ə"],
"are":["ˈɛɹ"],
"au":["ˈɔ","ɔ","ɔː","ˈaʊ"],
"aw":["ɔː"],
"b":["b","ˈb","ə",""],
"be":["ɪb"],
"c":["k","s","ə","ˈk","ʃ","ˌk","ˈs","","j","","","t"],
"cc":["","k"],
"ce":["ɪs","s","sˈɛ","n"],
"ch":["","k","ʃ","ˈk"],
"cz":[""],
"d":["d","ˈd","ɪ","ə","",""],
"e":["ˈɛ","ɪ","ə","i","ɛ","ˌɛ","e","ˈi","ˈa","ˈe","a","ˌi","","d","ˈɪ","ˌe","ʊ","ˌa","ɚ","s","","z"],
"ea":["ˈɪ","ˈi","","ˈɛ","ɛ","i","ˌi","e"],
"ed":["t","ɪ","d","ˈɛ","e"],
"er":["ɚ","ˈɚ","ə","ɹ","ˈɛ","ɜː","g","ɪ","d"],
"ew":["ˈu"],
"f":["f","ˈf","",""],
"g":["g","","ˈg","ʒ","ɪ","ə"],
"ge":["ʒ","g","d"],
"gh":["ɪ","g"],
"h":["","h","ˈh","a","","ˌo","ɛ"],
"i":["ɪ","i","ˈɪ","ə","ˌɪ","ˈi","ˈa","a","j","ˌa","ˌi","","aɪˈ","","ɪˈ","s","d","t","ŋ"],
"ing":[""],
"ir":["ˈɚ","ɹ","a","ˈa","ɪ","ɪɹˈ"],
"j":["dʒˈ","","j","ˈdʒ"],
"k":["k","ˈk","ə"],
"ke":["ɪk","k","ə","kˈɛ",""],
"ked":["t"],
"l":["l","ˈl","ˌa","","j","a","o","ˈɛ","ɪ","ə","ʊlˈ","","ɹ"],
"le":["əl","l","ˈɛ","ɪ","ə","g"],
"m":["m","ˈm","","ə","ˈɛ","ˌm","","ʊmˈ","","j"],
"me":["ʊm","ɪm","m","mˈɛ","ə","","ˈme"],
"n":["n","ŋ","ˈn","ə","","ɪ"],
"ne":["ɪn","ʊn","n","nˈi","nˈɛ",""],
"nel":["nˈɛ"],
"ness":[""],
"net":["nˈɛ"],
"new":["nˈu"],
"ng":["ŋ","g","n","t"],
"o":["ə","ˈɑ","ˈɔ","o","ˈoʊ","ɔ","ʊ","ɑ","ɒ","ˌɑ","ˈa","ˌɔ","ˈʌ","a","ʌ","ʊˈ","ˈɒ","ˌa","ˌo","d"],
"oa":["ˌoʊ","ˈoʊ"],
"on":["n","ə","ənˈ","ˈɑn","ən","ˈo","ɒn","o","ɑ","ˌɑn"],
"on's":["ən"],
"ons":["ən"],
"oo":["ˈu","ˈʊ","","ˌʊ","ʊ","u","ˌu"],
"or":["ɚ","ˈɔɹ","ɔː","ˌɔɹ","ɔɹ","ɔɹˈ","ə","ˌɚ","t"],
"ore":["ɔɹ"],
"ors":[""],
"ou":["ˈaʊ","ə","u","ˈu","","ˈɔ","ʊ","","ˈʌ","ʌ"],
"p":["p","ˈp","ˌp","ə"],
"ph":["f"],
"qu":["kwˈ","kw"],
"que":["k"],
"r":["ɹ","ɚ","ɛ"],
"re":["ɹ","ɚ"],
"s":["s","z","ʒ","ʃ"],
"sch":["ʃ"],
"se":["s","z"],
"sh":["ʃ"],
"ss":["s"],
"sse":["s"],
"t":["t"],
"tch":[""],
"te":["t"],
"th":["θ"],
"tt":["t"],
"tte":["t"],
"ty":["ti"],
"u":["ʌ","u","ju","w","ʊ"],
"ue":["u"],
"uer":["ɚ"],
"ur":["ɚ"],
"ure":["ɚ"],
"urr":["ɚ"],
"v":["v"],
"ve":["v"],
"w":["w"],
"x":["ks","gz"],
"y":["i","ɪ","","j"],
"ye":[""],
"z":["z","s"],
"ze":["z"],
"é":[""],
"ó":["ɔ"]}
,
"SrcMulti": [],
"DstMulti": [],
"SrcMultiSuffix": [],
"DstMultiSuffix": ["ː"],
"PrePhonWordSteps": [
{"Trim": ".,"},
{"ToLower": true}
]
}

"r":["ɹ","ɚ","ˈa","ˈɹ","ˈɚ","ɹˌ","ə","ɹˈ","ˈɛ","a","l"],
"s":["s","z","ˈs","ə","ʒ","ʊ","ɪ","ʃ","n","t","ˈz","ˌs"],
"sch":["ʃˈ","ʃ"],
"sh":["ʃ","ˈʃ"],
"ss":["ʃ","s","","ə"],
"t":["t","ʃ","ˈt","ə","","ɪ","a","ˌo","ˌa","","n","ˈɛ","s","ʊ","ˌt"],
"te":["ɪt","t","ˈɛ","ə","ɪ","ˈte","ˌɛ"],
"th":["θ","ð","ˈθ"],
"ts":["nt"],
"u":["ˈʌ","ə","ʌ","ˈu","u","ˌʌ","","juː","ˌu","ˈʊ","","ʊ","","j"],
"ur":["ˈɚ","ɚ","ʃ"],
"v":["v","ˈv"],
"ve":["ɪv","v","vˈɛ","ˌov",""],
"w":["","w","ʊ","f","ˈw","a",""],
"wr":["ɹˈ"],
"x":["ks","gzˈ"],
"y":["i","ɪ","ˈɪ","","a","ˈa","j","ɹ","ˌa","ˌɪ"],
"z":["z","s","t","ə"],
"ze":["ɪz"],
"zed":["ɪz"]},"SrcMulti":null,"DstMulti":null,"SrcMultiSuffix":null,"DstMultiSuffix":["ː"],
"DstMultiPrefix":["ˈ","'","ˌ"],
"DropLast":null,"SplitBefore":null,"SplitAfter":null,"PrePhonWordSteps":[{"Trim":".,"},{"ToLower":true}]}
Binary file removed dicts/english/weights0.json.gz
Binary file not shown.
Binary file added dicts/english/weights1.json.lzw
Binary file not shown.

0 comments on commit 835f99b

Please sign in to comment.