Is there such a thing as a dataset that can be easily queried for combinations of POS tags and strings? As an example, I may want to search for:

JJ "winter nights"

and have returned a series of sentences which include an adjective followed by the string 'winter nights', such as

cold winter nights

long winter nights

dark winter nights

What's the best tool for the job?

1 Answer 1


The IMS Corpus Query Processor (CQP) has a query language that can do what you need. There exist other implementations of similar Corpus Query engines, e.g., Poliqarp.

P.S. The query in cqp syntax looks like

[pos="JJ"] [word="winter"] [word="nights"]

Note that the cqp syntax allows for regular expressions (this makes it really powerful!). Below is the query with some sensible wildcards, the first captures all adjective forms, and the last captures both night and nights in one query.

[pos="J.*"] [word="winter"] [word="nights?"]
  • CQP is the tool I was looking for. It's too bad that the existing Corpora are not very large. The 'JJ "winter nights"' example yields only 1 result with the Dickens corpus, and 0 results with the Europarl 3 corpus. Guess those Euro-parliamentarians don't spend enough time discussing winter nights. Anyway you pointed me in the right direction. I'm now on corpus.byu.edu/wiki which uses Wikipedia as data source. That's a much larger dataset and the above example returns dozens of pertinent entries. Jan 16, 2017 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.