Class MorphosyntacticTagsAttributeImpl

java.lang.Object
org.apache.lucene.util.AttributeImpl
org.apache.lucene.analysis.morfologik.MorphosyntacticTagsAttributeImpl
All Implemented Interfaces:
Cloneable, MorphosyntacticTagsAttribute, org.apache.lucene.util.Attribute

public class MorphosyntacticTagsAttributeImpl extends org.apache.lucene.util.AttributeImpl implements MorphosyntacticTagsAttribute
Morphosyntactic annotations for surface forms.
See Also:
  • Constructor Details

    • MorphosyntacticTagsAttributeImpl

      public MorphosyntacticTagsAttributeImpl()
      Initializes this attribute with no tags
  • Method Details

    • getTags

      public List<StringBuilder> getTags()
      Returns the POS tag of the term. If you need a copy of this char sequence, copy its contents (and clone StringBuilders) because it changes with each new term to avoid unnecessary memory allocations.
      Specified by:
      getTags in interface MorphosyntacticTagsAttribute
    • clear

      public void clear()
      Description copied from interface: MorphosyntacticTagsAttribute
      Clear to default value.
      Specified by:
      clear in interface MorphosyntacticTagsAttribute
      Specified by:
      clear in class org.apache.lucene.util.AttributeImpl
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public void setTags(List<StringBuilder> tags)
      Sets the internal tags reference to the given list. The contents is not copied.
      Specified by:
      setTags in interface MorphosyntacticTagsAttribute
      Parameters:
      tags - A list of POS tags corresponding to current lemma.
    • copyTo

      public void copyTo(org.apache.lucene.util.AttributeImpl target)
      Specified by:
      copyTo in class org.apache.lucene.util.AttributeImpl
    • clone

      Overrides:
      clone in class org.apache.lucene.util.AttributeImpl
    • reflectWith

      public void reflectWith(org.apache.lucene.util.AttributeReflector reflector)
      Specified by:
      reflectWith in class org.apache.lucene.util.AttributeImpl