func (stem *Stem) parse(line string) (err error) {
	var (
		token  string
		sep    rune
		nwords int
		p      = parser.New(line, " \t")
	)
	for {
		token, sep = p.Token()
		if len(token) == 0 {
			return nil
		}
		ok, err := isValidMorpheme(token)
		if err != nil {
			return err
		}
		if ok {
			stem.rawMorphemes = append(stem.rawMorphemes,
				strings.Fields(token)...)
			p.SkipHorizontalSpaces()
			break
		}
		token, stem.rawFlags, err = parseWordFlags(token)
		if err != nil {
			return err
		}
		if len(stem.Word) > 0 {
			stem.Word += " "
		}
		stem.Word += token
		nwords++
		if nwords > 2 {
			return fmt.Errorf("only one or two words allowed: %q", line)
		}
		p.SkipHorizontalSpaces()
		if len(stem.rawFlags) > 0 {
			break
		}
		if sep == 0 {
			return nil
		}
	}
	for {
		token, _ = p.Token()
		if len(token) == 0 {
			break
		}
		ok, err := isValidMorpheme(token)
		if err != nil {
			return err
		}
		if !ok {
			return errInvalidMorpheme(token)
		}
		stem.rawMorphemes = append(stem.rawMorphemes, token)
		p.SkipHorizontalSpaces()
	}
	return nil
}
parse the single line of word with optional flags and zero or more
morphemes attributes.

STEM := WORD [ " " WORD ] [ "/" FLAGS ] [ *MORPHEME ]
package hunspell
import (
	"fmt"
	"strconv"
	"strings"
	"github.com/shuLhan/share/lib/parser"
)
type Stem struct {
	Word      string
	Morphemes Morphemes
	Parent    *Stem
	rawFlags     string
	rawMorphemes []string
	IsForbidden bool
}
func newStem(parent *Stem, word string, morphs Morphemes) (stem *Stem) {
	stem = &Stem{
		Word:      word,
		Morphemes: morphs.clone(),
		Parent:    parent,
	}
	if parent != nil {
		for k, v := range parent.Morphemes {
			stem.Morphemes.set(k, v)
		}
	}
	return stem
}
func parseStem(line string) (stem *Stem, err error) {
	if len(line) == 0 {
		return nil, nil
	}
	stem = &Stem{
		Morphemes: make(Morphemes),
	}
	err = stem.parse(line)
	if err != nil {
		return nil, err
	}
	return stem, nil
}
func (stem *Stem) Analyze() Morphemes {
	morphs := stem.Morphemes.clone()
	root := stem
	parent := stem.Parent
	for parent != nil {
		root = parent
		for k, v := range parent.Morphemes {
			morphs[k] = v
		}
		parent = parent.Parent
	}
	morphs.set(morphKeyST, root.Word)
	return morphs
}