Class NCTokenPredicateResult

    • Constructor Detail

      • NCTokenPredicateResult

        public NCTokenPredicateResult​(boolean res,
                                      int tokUses)
        Creates token predicate result.
        Parameters:
        res - Token predicate result.
        tokUses - How many times a token was used to match this predicate (if result is true). The more times a token was used the "stronger" the this match will be when used by intent solver. Must be greater than or equal to zero.
    • Method Detail

      • getResult

        public boolean getResult()
        Gets result of this predicate. True means that the term was matched, false otherwise.
        Returns:
        Predicate result.
      • getTokenUses

        public int getTokenUses()
        Gets how many times a token was used to match this predicate (if result is true). The zero value indicates that term was matched without using NCTokenPredicateContext.getToken(). Values greater than zero indicate that a token was used (once or more times) during term matching. Note also that greater token use value means greater match weight for the given term.
        Returns:
        Number of times a token was used to match this term. Must be greater than or equal to zero.