Does anyone know of a good tool to grab all example sentences used in a paper so they could be processed via an NLP pipeline? I have udpipe in mind especially: I'd like to take sentences from one or more linguistics research papers (or position papers, and so forth) and use them as input to the udpipe parser. I'm experimenting with adding fields to some udpipe data structures to retain a references to the page and other info where the sentences is extracted from the linguistics text, so that one could click back to the discussion from the (CoNLL-U, say) output. The rationale is that it would be interesting to see formal parse notations alongside discussions of those specific sentences -- unlike sentences drawn from most corpora, linguists introduce example sentences specifically to make a point or demonstrate a claim. I use a specific LaTeX command to typeset example sentences in my own work, so I know it's possible in principle to have example sentences automatically indexed in a PDF file, but I don't know if there's any standard practice in this regard. Currently I'm working in data set preparation in several fields (including linguistics) so I'm also exploring how example sentences (perhaps along with parsing data) can be published as data sets accompanying the main paper.

1 Answer 1


Welcome to Linguistics SE.

One of the efforts to crawl linguistic papers for interlinear glossed texts (IGT) was ODIN Project. Among the publications, there are papers that briefly describe how they parsed and looked for IGT in papers. See, for example, this paper. There is a repository for an IGT extractor from the related project, XIGT: https://github.com/xigt/igtdetect

Keep in mind, that this is by no means a straightforward process. Extracting anything structured from a PDF is always a painful process, and since there are multiple ways to generate documents with glosses (there are at least two packages in LaTeX to do that, moreover some papers are written in MS Word/OO Writer).

For ODIN, authors used regular expressions to detect IGTs in text, and then tried to extract the example in the detected areas, and they report low recall with very high precision (or medium recall and medium precision).

Regarding you second question, about publishing datasets, I have encountered several possibilities, although not a single one of them is a silver bullet:

  • Providing a LaTeX source or a compiled PDF: the most portable way, but provided data is very raw.

  • Providing a dataset as a Toolbox / FLEx / Exmaralda corpus: this is the most common way in a lot of linguistic communities, but there are limitations on the examples, for example, there is no semantic way to mark an example ungrammatical.

  • Using an XML-based format XIGT which is now used for ODIN data. As far as I know, this is the most adaptable and extensible format at the moment, but documentation is not that thorough.

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.