Example #1
0
        /**
         * <summary>Another getMetaMorphemeTag method which also takes parse as an input. It also checks the morphotactic tags.</summary>
         *
         * <param name="parse">MorphologicalParse type input.</param>
         * <param name="tag">  String to get meta morphemes from.</param>
         * <returns>ArrayList type result which holds meta morphemes.</returns>
         */
        public static List <MorphologicalTag> GetMetaMorphemeTag(MorphologicalParse parse, string tag)
        {
            var result = new List <MorphologicalTag>();

            var s = "" + tag[0];

            if (Word.IsPunctuation(s))
            {
                tag = tag.Substring(1);
            }

            for (var j = 0; j < MetaMorphemes.Length; j++)
            {
                if (tag == MetaMorphemes[j] && parse.ContainsTag(morphotacticTags[j]))
                {
                    result.Add(morphotacticTags[j]);
                }
            }

            return(result);
        }
Example #2
0
 /**
  * <summary> The constructor of {@link DisambiguatedWord} class which takes a {@link String} and a {@link MorphologicalParse}
  * as inputs. It creates a new {@link MorphologicalParse} with given MorphologicalParse. It generates a new instance with
  * given {@link String}.</summary>
  *
  * <param name="name"> Instances that will be a DisambiguatedWord.</param>
  * <param name="parse">{@link MorphologicalParse} of the {@link DisambiguatedWord}.</param>
  */
 public DisambiguatedWord(string name, MorphologicalParse parse) : base(name)
 {
     this._parse = parse;
 }