Exemple #1
0
func (this *Affixes) SearchRootsList(roots *set.Set, aff string, suf *sufrule, wd *Word, dic *Dictionary) {
	TRACE(3, "Checking a list of "+strconv.Itoa(roots.Size())+" roots", MOD_AFFIX)

	remain := roots.List()
	for len(remain) > 0 {
		r := remain[0]
		la := list.New()
		dic.SearchForm(r.(string), la)

		if la.Len() == 0 {
			TRACE(3, "Root "+r.(string)+" not found", MOD_AFFIX)
			roots.Remove(r)
		} else {
			TRACE(3, "Root "+r.(string)+" found in dictionary", MOD_AFFIX)
			this.ApplyRule(r.(string), la, aff, suf, wd, dic)
		}

		remain = remain[1:]
	}

}