use strict;
use warnings;

use Test::More tests => 1;

use Lingua::Ogmios;
use Lingua::Ogmios::Annotations::Token;
use Lingua::Ogmios::Annotations::LogProcessing;

my $NLPPlatform = Lingua::Ogmios->new('rcfile' => 'etc/ogmios/nlpplatform.rc');


warn "processing examples/pmid10788508-v4.xml\n";

#$NLPPlatform->loadDocuments(['examples/FrenchText.xml']);
$NLPPlatform->loadDocuments(['examples/pmid10788508-v4.xml']);

$NLPPlatform->tokenisation;

for my $doc (values (%{$NLPPlatform->getDocumentCollection->[0]->getDocuments})) {
    warn "$doc\n";
    $doc->getAnnotations->getSectionLevel->printIndex('from');
    print STDERR "---\n";
    $doc->getAnnotations->getSectionLevel->printIndex('to');
#     $doc->getAnnotations->getTokenLevel->printIndex('id');
    print STDERR "---\n";
}

for my $doc (values (%{$NLPPlatform->getDocumentCollection->[0]->getDocuments})) {
    warn "$doc\n";
    $doc->getAnnotations->getTokenLevel->printIndex('from');
    print STDERR "---\n";
    $doc->getAnnotations->getTokenLevel->printIndex('to');
#     $doc->getAnnotations->getTokenLevel->printIndex('id');
    print STDERR "---\n";
}

#print STDERR $NLPPlatform->XMLout;

# $NLPPlatform->linguisticProcessing;

#print STDERR $NLPPlatform->XMLout;


ok(defined $NLPPlatform);

