Text syntactic and semantic analysis