Class IntegerTagger

    • Constructor Detail

      • IntegerTagger

        public IntegerTagger​(int min,
                             int max)
    • Method Detail

      • getMin

        public int getMin()
      • getMax

        public int getMax()
      • isAllowsLeadingZero

        public boolean isAllowsLeadingZero()
      • setAllowsLeadingZero

        public void setAllowsLeadingZero​(boolean allowsLeadingZero)
      • getDescription

        public String getDescription()
      • belongsTo

        public float belongsTo​(Area node)
      • allowsContinuation

        public boolean allowsContinuation​(Area node)
      • allowsJoining

        public boolean allowsJoining()
      • mayCoexistWith

        public boolean mayCoexistWith​(Tag other)
      • validateMatch

        protected boolean validateMatch​(String srcString,
                                        String substring,
                                        int matchStart,
                                        int matchEnd)
        Validates the substring match -- checks the neighborhood and numeric range. This may be overriden for particular use cases.
        Parameters:
        srcString - the whole source string
        substring - the matched substring
        matchStart - start index of the substring in the whole string
        matchEnd - end index of the substring in the whole string
        Returns:
        true when the match corresponds to the number range and other limitations
      • validateRange

        protected boolean validateRange​(int value)
      • getNumExpr

        protected Pattern getNumExpr()