Class EquivItem

  • All Implemented Interfaces:
    TaggableItem, java.lang.Cloneable

    public class EquivItem
    extends CompositeTaggableItem
    An Item where each child is an alternative which can be matched. Produces the same recall as Or, but differs in that the relevance of a match does not increase if more than one children is matched: With Equiv, matching one child perfectly is a perfect match.

    This can only have Word, WordAlternatives, Exact, Int or Phrase children.

    Author:
    havardpe
    • Constructor Detail

      • EquivItem

        public EquivItem()
        Makes an EQUIV item with no children
      • EquivItem

        public EquivItem​(Item item)
        Creates an EQUIV with the given item as child. The new EQUIV will take connectivity, significance and weight from the given item.
        Parameters:
        item - will be modified and added as a child
      • EquivItem

        public EquivItem​(Item item,
                         java.util.Collection<java.lang.String> words)
        Creates an EQUIV with the given item and a set of alternate words as children. The new EQUIV will take connectivity, significance and weight from the given item.
        Parameters:
        item - will be modified and added as a child
        words - set of words to create WordItems from
    • Method Detail

      • getItemType

        public Item.ItemType getItemType()
        Description copied from class: Item
        Return the enumerated type of this item.
        Specified by:
        getItemType in class Item
      • getName

        public java.lang.String getName()
        Description copied from class: Item
        Returns the name of this item
        Specified by:
        getName in class Item