Interface LexicalClusteringStrategy

    • Method Summary

      Modifier and Type Method Description
      long globalNumber​(int localIndex, long localNumber)
      Returns the global term number given a local index and a local term number (optional operation).
      int localIndex​(CharSequence term)
      Returns the index to which a given term is be mapped by this strategy.
    • Method Detail

      • localIndex

        int localIndex​(CharSequence term)
        Returns the index to which a given term is be mapped by this strategy.
        Parameters:
        term - a term.
        Returns:
        the corresponding local index, or -1 if no index contains the term.
      • globalNumber

        long globalNumber​(int localIndex,
                          long localNumber)
        Returns the global term number given a local index and a local term number (optional operation).

        This operation is not, in general, necessary for a LexicalCluster to work, as no action on a local index returns local numbers. It is defined here mainly for completeness and for debugging purposes (in case it is implemented).

        Parameters:
        localIndex - the local index.
        localNumber - the local term number.
        Returns:
        the global term number.