Class FirstStrongDirectionEstimator


  • public class FirstStrongDirectionEstimator
    extends DirectionEstimator
    Direction estimator that uses the "first strong" heuristic.
    • Constructor Detail

      • FirstStrongDirectionEstimator

        public FirstStrongDirectionEstimator()
    • Method Detail

      • get

        public static FirstStrongDirectionEstimator get()
        Get an instance of FirstStrongDirectionEstimator.
        Returns:
        An instance of FirstStrongDirectionEstimator.
      • estimateDirection

        public HasDirection.Direction estimateDirection​(java.lang.String str)
        Estimates the direction of a given string using the "first strong" heuristic: The return value is determined by the first character in the string with strong directionality. If there is no such character, the return value is DEFAULT.
        Specified by:
        estimateDirection in class DirectionEstimator
        Parameters:
        str - Input string.
        Returns:
        Direction The estimated direction of str.