/// <summary> Check the rules on the given string, and expand the morpheme chart.</summary> /// <param name="from">- the index for the start of segment position /// </param> /// <param name="str1">- the front part of the string /// </param> /// <param name="str2">- the next part of the string /// </param> /// <param name="sp">- the segment position /// </param> public virtual void prule(int from, System.String str1, System.String str2, SegmentPosition sp) { int i; rule_NP(from, str1, str2); // sp.printPosition(); for (i = 0; i < str2.Length; i++) { rule_rem(from, str1, str2, i); // sp.printPosition(); rule_irr_word(from, str1, str2, i); // sp.printPosition(); rule_irr_word2(from, str1, str2, i); // sp.printPosition(); rule_shorten(from, str1, str2, i); // sp.printPosition(); rule_eomi_u(from, str1, str2, i); // sp.printPosition(); rule_johwa(from, str1, str2, i); // sp.printPosition(); rule_i(from, str1, str2, i); // sp.printPosition(); rule_gut(from, str1, str2, i); // sp.printPosition(); } }
/// <summary> Constructor.</summary> /// <param name="tagSet">- the morpheme tag set /// </param> /// <param name="connection">- the morpheme connection rules /// </param> /// <param name="systemDic">- the system morpheme dictionary /// </param> /// <param name="userDic">- the user morpheme dictionary /// </param> /// <param name="numDic">- the number dictionary /// </param> /// <param name="simti">- the SIMple Trie Index /// </param> /// <param name="resEojeolList">- the list of eojeols to store the analysis result /// </param> public MorphemeChart(TagSet tagSet, Connection connection, Trie systemDic, Trie userDic, NumberDic numDic, Simti simti, LinkedList <Eojeol> resEojeolList) { chart = new Morpheme[MAX_MORPHEME_CHART]; for (int i = 0; i < MAX_MORPHEME_CHART; i++) { chart[i] = new Morpheme(this); } this.sp = new SegmentPosition(); this.tagSet = tagSet; this.connection = connection; this.exp = new Exp(this, tagSet); this.systemDic = systemDic; this.userDic = userDic; this.numDic = numDic; this.simti = simti; this.resEojeols = resEojeolList; resMorphemes = new List <String>(); resTags = new List <String>(); chiReplacementList = new LinkedList <String>(); engReplacementList = new LinkedList <String>(); }
private void InitBlock(SegmentPosition enclosingInstance) { this.enclosingInstance = enclosingInstance; morpheme = new int[kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer.SegmentPosition.MAX_MORPHEME_COUNT]; }
public Position(SegmentPosition enclosingInstance) { InitBlock(enclosingInstance); }
/// <summary> Check the rules on the given string, and expand the morpheme chart.</summary> /// <param name="from">- the index for the start of segment position /// </param> /// <param name="str1">- the front part of the string /// </param> /// <param name="str2">- the next part of the string /// </param> /// <param name="sp">- the segment position /// </param> public virtual void prule(int from, System.String str1, System.String str2, SegmentPosition sp) { int i; rule_NP(from, str1, str2); // sp.printPosition(); for (i = 0; i < str2.Length; i++) { rule_rem(from, str1, str2, i); // sp.printPosition(); rule_irr_word(from, str1, str2, i); // sp.printPosition(); rule_irr_word2(from, str1, str2, i); // sp.printPosition(); rule_shorten(from, str1, str2, i); // sp.printPosition(); rule_eomi_u(from, str1, str2, i); // sp.printPosition(); rule_johwa(from, str1, str2, i); // sp.printPosition(); rule_i(from, str1, str2, i); // sp.printPosition(); rule_gut(from, str1, str2, i); // sp.printPosition(); } }
private void InitBlock(SegmentPosition enclosingInstance) { this.enclosingInstance = enclosingInstance; morpheme = new int[kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer.SegmentPosition.MAX_MORPHEME_COUNT]; }
public Position(SegmentPosition enclosingInstance) { InitBlock(enclosingInstance); }
/// <summary> Constructor.</summary> /// <param name="tagSet">- the morpheme tag set /// </param> /// <param name="connection">- the morpheme connection rules /// </param> /// <param name="systemDic">- the system morpheme dictionary /// </param> /// <param name="userDic">- the user morpheme dictionary /// </param> /// <param name="numDic">- the number dictionary /// </param> /// <param name="simti">- the SIMple Trie Index /// </param> /// <param name="resEojeolList">- the list of eojeols to store the analysis result /// </param> public MorphemeChart(TagSet tagSet, Connection connection, Trie systemDic, Trie userDic, NumberDic numDic, Simti simti, LinkedList<Eojeol> resEojeolList) { chart = new Morpheme[MAX_MORPHEME_CHART]; for (int i = 0; i < MAX_MORPHEME_CHART; i++) { chart[i] = new Morpheme(this); } this.sp = new SegmentPosition(); this.tagSet = tagSet; this.connection = connection; this.exp = new Exp(this, tagSet); this.systemDic = systemDic; this.userDic = userDic; this.numDic = numDic; this.simti = simti; this.resEojeols = resEojeolList; resMorphemes = new List<String>(); resTags = new List<String>(); chiReplacementList = new LinkedList<String>(); engReplacementList = new LinkedList<String>(); }