The dates detection module, as the number detection module in section 3.5, is a collection of language-specific finite-state automata, and for this reason needs no data file to be provided at instantiation time.
For languages that do not have a specific automata, a default analyzer is used that detects simple date patterns (e.g. DD-MM-AAAA, MM/DD/AAAA, etc.)
The API of the class is:
class dates { public: /// Constructor: receives the language code dates(const std::string &); /// analyze given sentence. void analyze(sentence &) const; /// analyze given sentences. void analyze(std::list<sentence> &) const; /// return analyzed copy of given sentence sentence analyze(const sentence &) const; /// return analyzed copy of given sentences std::list<sentence> analyze(const std::list<sentence> &) const; };
The only parameter expected by the constructor is the language of the text to analyze, in order to be able to apply the appropriate specific automata, or select the default one if none is available.