public override void Initialize() { Composition = new SegmentChain <Morpheme>(); GraphemeChain = new List <SegmentChain <Grapheme> >(); PhonemeChain = new List <SegmentChain <Phoneme> >(); Features = new HashSet <Feature>(); }
public Text() { Discourse = new SegmentChain <Discourse>(); Composition = new SegmentChain <Text>(); Lexicon = new Lexicon(); Paralexicon = new Lexicon { string.Empty }; }
public static SegmentChain <T> NewSegmentChain(List <T> segmentList) { var chain = new SegmentChain <T>(); foreach (var segment in segmentList) { chain.AddLast(segment); } return(chain); }
public Morpheme(SegmentChain <Grapheme> glyphChain) { Graph = glyphChain.ToString(); GraphemeChain = new List <SegmentChain <Grapheme> >() { glyphChain }; PhonemeChain = new List <SegmentChain <Phoneme> >(); Meaning = new Concept(); Features = new HashSet <Feature>(); }
public Morpheme(List <Grapheme> graphemes) { var graphemeChain = SegmentChain <Grapheme> .NewSegmentChain(graphemes); Graph = graphemeChain.ToString(); GraphemeChain = new List <SegmentChain <Grapheme> >() { graphemeChain }; PhonemeChain = new List <SegmentChain <Phoneme> >(); Meaning = new Concept(); Features = new HashSet <Feature>(); }
public Morpheme Add(List <Grapheme> graphemes, int weight = 1) { var graphemeChain = SegmentChain <Grapheme> .NewSegmentChain(graphemes); //var thisWord = Keys.FirstOrDefault(w => w.GraphemeChain.Contains(graphemeChain)); var thisWord = Keys.FirstOrDefault(w => w.Graph == graphemeChain.Graph); if (thisWord == null) { thisWord = new Morpheme(graphemeChain); Add(thisWord, weight); } else { this[thisWord] += weight; } return(thisWord); }
public SegmentChain <Grapheme> SetComposition(List <Grapheme> componentSegments) { Composition = SegmentChain <Grapheme> .NewSegmentChain(componentSegments); return(Composition); }
public override void Initialize() { Glyphs = new List <GlyphChain>(); Composition = new SegmentChain <Grapheme>(); }
public SegmentChain <Discourse> SetComposition(List <Discourse> componentSegments) { Composition = SegmentChain <Discourse> .NewSegmentChain(componentSegments); return(Composition); }
public Discourse() { Expressions = new SegmentChain <Expression>(); Composition = new SegmentChain <Discourse>(); }
public override void Initialize() { Expressions = new SegmentChain <Expression>(); Composition = new SegmentChain <Discourse>(); }
public override void Initialize() { Discourse = new SegmentChain <Discourse>(); Composition = new SegmentChain <Text>(); }
public SegmentChain <Glyph> SetComposition(List <Glyph> componentSegments) { Composition = SegmentChain <Glyph> .NewSegmentChain(componentSegments); return(Composition); }
public override void Initialize() { Composition = new SegmentChain <Glyph>(); }
public SegmentChain <Expression> SetComposition(List <Expression> componentSegments) { Composition = SegmentChain <Expression> .NewSegmentChain(componentSegments); return(Composition); }
public override void Initialize() { Sequence = new SegmentChain <Morpheme>(); Composition = new SegmentChain <Expression>(); }