Ejemplo n.º 1
0
func (nn *MorfE) InitEngl() {
	nn.Graf.Init()

	nn.Unions = make(map[string]map[string]string, 0)
	frub.Decode(&nn.Unions, "file/englishLemm/noFounf")

	nn.frequence = make(map[string]int, 0)
	frub.GetByZn(&nn.frequence, "file/englishLemm/frequence1.gob")

	nn.fraz = make(map[string][][]string)
	frub.Decode(&nn.fraz, "file/englishLemm/fraz")

	nn.expVerb = make(map[string][]string, 0)
	frub.GetByZn(&nn.expVerb, "file/englishLemm/findverb1.gob")
	nn.expVerb1 = make(map[string]string, 0)
	frub.GetByZn(&nn.expVerb, "file/englishLemm/findverb.gob")
	nn.expAdj = make(map[string][]string, 0)
	frub.GetByZn(&nn.expAdj, "file/englishLemm/findadj1.gob")
	nn.expNoun = make(map[string]string, 0)
	frub.Decode(&nn.expNoun, "file/englishLemm/findnoun")

	nn.Verb = make(map[string]string, 0)
	frub.Decode(&nn.Verb, "file/englishLemm/verb")
	nn.Noun = make(map[string]string, 0)
	frub.Decode(&nn.Noun, "file/englishLemm/noun")
	nn.Adj = make(map[string]string, 0)
	frub.Decode(&nn.Adj, "file/englishLemm/adj")
	nn.Adv = make(map[string]string, 0)
	frub.Decode(&nn.Adv, "file/englishLemm/adv")
	nn.rubbx = frub.NewRubAr()
}
Ejemplo n.º 2
0
// инициализация словарей
func (nn *Morf) Init() {
	nn.ItogOk = make([]map[string][]map[string]string, 20503)
	nn.Search = make(map[string]map[string][]uint16, 234457)
	var wg sync.WaitGroup
	wg.Add(2)
	go func() {
		defer wg.Done()
		f.GetByZn(&nn.ItogOk, "file/itogOkI")
	}()
	go func() {
		defer wg.Done()
		f.GetByZn(&nn.Search, "file/search1")
	}()
	wg.Wait()
	nn.rubbx = f.NewRubAr()
}