Class ParsePhrase

    • Constructor Detail

      • ParsePhrase

        public ParsePhrase​(List<edu.kit.ipd.parse.luna.graph.INode> containedNodes,
                           String type)
      • ParsePhrase

        public ParsePhrase​(String type)
    • Method Detail

      • appendWord

        public void appendWord​(ParseWord word)
        Appends a word to this phrase. Same as addWord(ParseWord).
        Parameters:
        word - Word that should be added
      • prependWord

        public void prependWord​(ParseWord word)
        Prepends a word to this phrase.
        Parameters:
        word - Word that should be added
      • addWord

        public void addWord​(ParseWord word)
        Adds a word to the end of this phrase.
        Parameters:
        word - Word that should be added
      • addWord

        public void addWord​(ParseWord word,
                            int position)
        Adds a word at the given position to this phrase.
        Parameters:
        word - Word that should be added
        position - Position where the word should be inserted
      • getWords

        public org.eclipse.collections.api.list.MutableList<ParseWord> getWords()
        Specified by:
        getWords in interface Phrase
        Returns:
        a list of the words contained in the phrase
      • containsWord

        public boolean containsWord​(Word word)
        Description copied from interface: Phrase
        Checks whether a word is contained in the phrase.
        Specified by:
        containsWord in interface Phrase
        Parameters:
        word - Word that should be checked for
        Returns:
        true, if the given word is contained in the phrase, else false
      • getTextWithoutLeadingStopwords

        public String getTextWithoutLeadingStopwords()
        Specified by:
        getTextWithoutLeadingStopwords in interface Phrase
        Returns:
        String containing the text without any leading stopwords
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • annotate

        public void annotate​(Document document,
                             Annotation annotation)
        Description copied from interface: Annotatable
        Annotates the given annotation to the given document
        Specified by:
        annotate in interface Annotatable
        Parameters:
        document - Document where the annotation should be added to
        annotation - Annotation that should be added