Text parsing and analysis (unfinished)