There are two helper functions to process a RTF file: one that does minimal processing and sends you the data as it appears in the file, and one that sends you preprocessed results upon significant state changes.
See Implementation