Skip to content

Commit

Permalink
add armenian
Browse files Browse the repository at this point in the history
  • Loading branch information
neurlang authored and Your Name committed Dec 18, 2024
1 parent dcbead5 commit 4ab2e9d
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dicts/armenian/language.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package armenian

import "embed"

//go:embed *.tsv language.json weights1.json.lzw
var Language embed.FS
103 changes: 103 additions & 0 deletions dicts/armenian/language.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{"Map":{"Ա":["ɑ","ɑ́"],
"Բ":["b"],
"Գ":["ɡ"],
"Դ":["d"],
"Ե":["je","","e"],
"Զ":["z"],
"Է":["e"],
"Թ":[""],
"Ժ":["ʒ","ʒə"],
"Ի":["i"],
"Լ":["l"],
"Խ":["χ"],
"Կ":["k"],
"Հ":["h"],
"Ձ":["dzə","dz"],
"Ղ":["ʁ"],
"Ճ":[""],
"Մ":["m"],
"Յ":["j"],
"Ն":["n"],
"Շ":["ʃ"],
"Ո":["vo"],
"Ու":["u"],
"Չ":["tʃʰ"],
"Պ":["p"],
"Ջ":[""],
"Ռ":["r"],
"Ս":["s"],
"Վ":["v"],
"Տ":["t"],
"Ց":["tsʰ"],
"Փ":[""],
"Ք":[""],
"Օ":["o","ó"],
"Ֆ":["f"],
"ա":["ɑ","ɑ́"],
"բ":["b","","p"],
"բբ":[""],
"գ":["ɡ","","k"],
"գգ":["ɡː","ɡəkʰ"],
"գրա":["ɡəɾɑ","ɡɾɑ","ɡɾɑ́","ɡəɾɑ́"],
"դ":["d","","t"],
"դդ":[""],
"ե":["e","é","j","ɛ"],
"եե":[""],
"ենթա":["jentʰɑ"],
"զ":["z","s"],
"է":["e","é"],
"ը":["ə","ə́"],
"թ":["","tsʰ","tʰə","ʰː","t"],
"ժ":["ʒ"],
"ի":["í","i","j"],
"իա":["ijɑ","ijɑ́","","i","íɑ"],
"իու":["iju","ijú","ju"],
"լ":["l"],
"լլ":[""],
"խ":["χ"],
"ծ":["ts"],
"ծք":["tskʰ"],
"կ":["k"],
"կկ":[""],
"հ":["h","ə",""],
"ձ":["dz","tsʰ","dzə"],
"ձև":["dzév","dzev"],
"ղ":["ʁ","χ"],
"ղխ":["χː","ʁχ"],
"ղղ":["ʁː"],
"ղղա":["ʁːɑ"],
"ճ":["","","ʃ"],
"մ":["m"],
"մմ":[""],
"յ":["j","ʲ"],
"ն":["n","ŋ"],
"նաց":["nɑtsʰ","ənɑ́tsʰ","nɑ́tsʰ"],
"նն":["","ənː","n"],
"շ":["ʃ"],
"ո":["o","ó"],
"ու":["u","ú"],
"չ":["tʃʰ"],
"պ":["p"],
"պպ":[""],
"ջ":["","tʃʰ","ədʒə"],
"ռ":["r"],
"ս":["s"],
"սս":[""],
"վ":["v","f"],
"տ":["t","d"],
"տտ":[""],
"ր":["ɾ","r"],
"րկկ":["eɾkː"],
"րր":["ɹː"],
"ց":["tsʰ",""],
"փ":["","pʰə"],
"ք":["","əkʰə"],
"քեղ":["əkʰeʁ","əkʰéʁ"],
"քք":["kʰː"],
"օ":["o","ó"],
"ֆ":["f"],
"և":["ev","év","ef"],
"ևս":["éfs","évəs","efs","jévəs"]}
,"SrcMulti":null,"DstMulti":null,"SrcMultiSuffix":null,"DstMultiSuffix":["ː"],
"DstMultiPrefix":["ˈ","'","ˌ"],
"DropLast":null,"SplitBefore":null,"SplitAfter":null,"PrePhonWordSteps":[{"Trim":".,"},{"ToLower":true}]}
Empty file added dicts/armenian/missing.tsv
Empty file.
Binary file added dicts/armenian/weights1.json.lzw
Binary file not shown.
3 changes: 3 additions & 0 deletions dicts/dicts.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import "github.com/neurlang/goruut/dicts/uyghur"
import "github.com/neurlang/goruut/dicts/thai"
import "github.com/neurlang/goruut/dicts/zulu"
import "github.com/neurlang/goruut/dicts/catalan"
import "github.com/neurlang/goruut/dicts/armenian"
import "errors"

var ErrUnsupportedLanguage = errors.New("unsupportedLang")
Expand Down Expand Up @@ -238,6 +239,8 @@ func GetDict(lang, filename string) ([]byte, error) {
return zulu.Language.ReadFile(filename)
case "Catalan":
return catalan.Language.ReadFile(filename)
case "Armenian":
return armenian.Language.ReadFile(filename)
default:
return nil, ErrUnsupportedLanguage
}
Expand Down

0 comments on commit 4ab2e9d

Please sign in to comment.