I was working on creating a question answering system. Now I wanted to deal with incomplete or partial sentences. So the first step to this would be detecting whether the question entered by the user is complete or incomplete. How do I classify "Who is Obama's Wife" as complete and "Obama's Wife" as incomplete?
1 Answer
For formal English anyway you can parse with spaCy and then iterate through the tagged tokens looking for a finite verb (VerbForm=Fin
, as opposed to Ger
or Inf
).
See https://spacy.io/usage/linguistic-features#rule-based-morphology
-
Hey! I am working with a search engine here. So basically most of the queries would be partially complete. I want to check if the sentence is partially complete or absolutely keyword based. May 4, 2018 at 10:33