gate - How to get the name of the document, the pipeline is currently working on? -
let's say, corpus have 1k docs, , processed pipeline.
@ point, pipeline stucks, throws exception or have funny behavior. these document-relevant.
it'd nice know document being processed in pipeline. example, print out doc name in jape transducer.
to document processing can write simple jape rule like:
phase: docname input: token options: control = once rule:docname ( {token} ) --> { system.out.println(doc.getname()); }
put rule first rule in pipeline. hope have least 1 token in document.
Comments
Post a Comment