Skip to content

Commit

Permalink
for noe, we completely FORBID to run Frog on already frogged document…
Browse files Browse the repository at this point in the history
…s with provenance data
  • Loading branch information
Ko van der Sloot authored and Ko van der Sloot committed May 27, 2019
1 parent d85c023 commit 05039d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/FrogAPI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ FrogAPI::~FrogAPI() {

folia::processor *FrogAPI::add_provenance( folia::Document& doc ) const {
string _label = "frog";
vector<folia::processor *> procs = doc.get_processors_by_name( _label );
if ( !procs.empty() ){
cerr << "unable to run frog on already frogged documents!" << endl;
exit(1);
}
folia::processor *proc = doc.get_processor( _label );
if ( !proc ){
folia::KWargs args;
Expand All @@ -521,7 +526,7 @@ folia::processor *FrogAPI::add_provenance( folia::Document& doc ) const {
proc = doc.add_processor( args );
proc->get_system_defaults();
}
if ( true || options.debugFlag > 4 ){
if ( options.debugFlag > 4 ){
DBG << "add_provenance(), using processor: " << proc->id() << endl;
}
tokenizer->add_provenance( doc, proc ); // unconditional
Expand Down Expand Up @@ -1589,7 +1594,7 @@ void FrogAPI::run_folia_engine( const string& infilename,
if ( options.inputclass == options.outputclass ){
tokenizer->setFiltering(false);
}
if ( true || options.debugFlag > 0 ){
if ( options.debugFlag > 0 ){
DBG << "run_folia_engine(" << infilename << "," << xmlOutFile << ")" << endl;
}
if ( xmlOutFile.empty() ){
Expand Down

0 comments on commit 05039d3

Please sign in to comment.