Can I tell which file a JCas was read from?

3 views
Skip to first unread message

Alain Désilets

unread,
Dec 3, 2019, 7:48:20 AM12/3/19
to dkpro-core-user
I am using a CollectionReader that reads a bunch of Brat files into JCases.

When debugging my pipelines, I often find myself needing to know what file the JCas was read from? Is there a way to get that information?

Richard Eckart de Castilho

unread,
Dec 3, 2019, 7:49:38 AM12/3/19
to dkpro-c...@googlegroups.com
On 3. Dec 2019, at 13:48, Alain Désilets <alainde...@gmail.com> wrote:
>
> I am using a CollectionReader that reads a bunch of Brat files into JCases.
>
> When debugging my pipelines, I often find myself needing to know what file the JCas was read from? Is there a way to get that information?

I don't have the IDE open, but it should be something like this:

DocumentMetaData.get(jcas).getDocumentUri()

Cheers,

-- Richard
Reply all
Reply to author
Forward
0 new messages