Algorithm that detects logical structure in text | Hacker News Reader