Module english_parser

Source
Expand description

Grammar for a simple English parser

english_parser module contains rules to parse words, numbers, punctuation, sentences and whole tetx in English.

Functions§

capital_word
capital_word matches a word that starts with a capital letter.
date
date matches dates in the format dd/mm/yyyy.
end_punctuation
end_punctuation matches sentence-ending punctuation.
hour
hour matches times in the format hh:mm (am|pm).
number
number matches a sequence of numeric characters.
other_punctuation
sentence
sentence matches a sequence of words, numbers and other punctuation ending with sentence-ending punctuation.
text
text matches a series of sentences, separated by whitespace.
whitespace
whitespace matches any whitespace character.
word
word matches a word, which is a sequence of alphabetic characters with optinal symbols - and ’