pt.tumba.cage
Class Numex

java.lang.Object
  extended by pt.tumba.cage.Numex

public class Numex
extends java.lang.Object

Implements methods for recognizing numeric expressions in both Portuguese and English texts.

Author:
Bruno Martins

Method Summary
static Numex getInstance()
          Returns an instance of Numex.
static void main(java.lang.String[] args)
          Main method to test Numeric Expression Recognition.
static java.util.Date recognizeDate(java.lang.String text)
          Recognize a Date in a text.
static java.lang.Double recognizeNumex(java.lang.String text)
          Recognize a numeric expression in a text.
static java.lang.String recognizePhoneNumber(java.lang.String text)
          Recognize a Phone number in a text.
static java.sql.Time recognizeTime(java.lang.String text)
          Recognize a Time expression in a text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Numex getInstance()
Returns an instance of Numex.

Returns:
An instance of Numex.

recognizeNumex

public static java.lang.Double recognizeNumex(java.lang.String text)
Recognize a numeric expression in a text.

Parameters:
text - A string with a numeric expression.
Returns:
The numeric value associated with the numeric expression (or null).

recognizeDate

public static java.util.Date recognizeDate(java.lang.String text)
Recognize a Date in a text.

Parameters:
text - A string with a date.
Returns:
The date associated with the string (or null).

recognizeTime

public static java.sql.Time recognizeTime(java.lang.String text)
Recognize a Time expression in a text.

Parameters:
text - A string with a Time expression.
Returns:
The time associated with the string (or null).

recognizePhoneNumber

public static java.lang.String recognizePhoneNumber(java.lang.String text)
Recognize a Phone number in a text.

Parameters:
text - A string with a phone number.
Returns:
A string with the phone number (or null).

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main method to test Numeric Expression Recognition.

Parameters:
args - The command line options, tokenized.
Throws:
java.lang.Exception