Esempio n. 1
0
 public override void Initialize()
 {
     Composition   = new SegmentChain <Morpheme>();
     GraphemeChain = new List <SegmentChain <Grapheme> >();
     PhonemeChain  = new List <SegmentChain <Phoneme> >();
     Features      = new HashSet <Feature>();
 }
Esempio n. 2
0
 public Text()
 {
     Discourse   = new SegmentChain <Discourse>();
     Composition = new SegmentChain <Text>();
     Lexicon     = new Lexicon();
     Paralexicon = new Lexicon
     {
         string.Empty
     };
 }
Esempio n. 3
0
        public static SegmentChain <T> NewSegmentChain(List <T> segmentList)
        {
            var chain = new SegmentChain <T>();

            foreach (var segment in segmentList)
            {
                chain.AddLast(segment);
            }
            return(chain);
        }
Esempio n. 4
0
        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>();
        }
Esempio n. 5
0
        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>();
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        public SegmentChain <Grapheme> SetComposition(List <Grapheme> componentSegments)
        {
            Composition = SegmentChain <Grapheme> .NewSegmentChain(componentSegments);

            return(Composition);
        }
Esempio n. 8
0
 public override void Initialize()
 {
     Glyphs      = new List <GlyphChain>();
     Composition = new SegmentChain <Grapheme>();
 }
Esempio n. 9
0
        public SegmentChain <Discourse> SetComposition(List <Discourse> componentSegments)
        {
            Composition = SegmentChain <Discourse> .NewSegmentChain(componentSegments);

            return(Composition);
        }
Esempio n. 10
0
 public Discourse()
 {
     Expressions = new SegmentChain <Expression>();
     Composition = new SegmentChain <Discourse>();
 }
Esempio n. 11
0
 public override void Initialize()
 {
     Expressions = new SegmentChain <Expression>();
     Composition = new SegmentChain <Discourse>();
 }
Esempio n. 12
0
 public override void Initialize()
 {
     Discourse   = new SegmentChain <Discourse>();
     Composition = new SegmentChain <Text>();
 }
Esempio n. 13
0
        public SegmentChain <Glyph> SetComposition(List <Glyph> componentSegments)
        {
            Composition = SegmentChain <Glyph> .NewSegmentChain(componentSegments);

            return(Composition);
        }
Esempio n. 14
0
 public override void Initialize()
 {
     Composition = new SegmentChain <Glyph>();
 }
Esempio n. 15
0
        public SegmentChain <Expression> SetComposition(List <Expression> componentSegments)
        {
            Composition = SegmentChain <Expression> .NewSegmentChain(componentSegments);

            return(Composition);
        }
Esempio n. 16
0
 public override void Initialize()
 {
     Sequence    = new SegmentChain <Morpheme>();
     Composition = new SegmentChain <Expression>();
 }