Ejemplo 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>();
 }
Ejemplo n.º 2
0
 public Text()
 {
     Discourse   = new SegmentChain <Discourse>();
     Composition = new SegmentChain <Text>();
     Lexicon     = new Lexicon();
     Paralexicon = new Lexicon
     {
         string.Empty
     };
 }
Ejemplo 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);
        }
Ejemplo 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>();
        }
Ejemplo 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>();
        }
Ejemplo 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);
        }
Ejemplo n.º 7
0
        public SegmentChain <Grapheme> SetComposition(List <Grapheme> componentSegments)
        {
            Composition = SegmentChain <Grapheme> .NewSegmentChain(componentSegments);

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

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

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

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