2

Let's say, a corpus have 1k docs, and be processed by a pipeline.
At some point, the pipeline stucks, throws exception or have funny behavior. But all these are very likely to be document-relevant.
So it'd be nice to know which document is being processed in the pipeline. For example, to print out the doc name in a Jape transducer.

Matt
  • 741
  • 1
  • 6
  • 17

1 Answers1

2

To get document processing you can write a simple JAPE rule like:

Phase:  DocName
Input: Token
Options: control = once

Rule:DocName
(
 {Token}
)
-->
{
  System.out.println(doc.getName());
}

Put this rule as a first rule in your pipeline. I hope that you have a least 1 Token in the document.

ashingel
  • 494
  • 3
  • 11