Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are correct, I look for a pattern and apply very very basic logic.

I just got 1,000 questions from the demo page and looked how they were similar. For example, there are many questions of the form "[list of something]: the [ordinal number] [type] is?" so I put that as a rule in the grammar file. I did this for about twenty different types of questions, each of which has three or so different phrasings.

And yes, they may have 180 million questions, but in reality they have only a hundred or so modulo the specific words they pick (for the items in the list, or for the day of the week, or for the letter that the word starts with).



  > I put that as a rule in the grammar file
What are you using the process the grammar file? What type of grammar?


I wrote a parser generator, so I'm using that.

It's BNF-like.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: