Switch off DEBUGs
Change-Id: I45a920ed90483bdd8e93e55546ab6aafb38d39fe
diff --git a/lib/Krawfish/Compile/Segment/Sort/Sample.pm b/lib/Krawfish/Compile/Segment/Sort/Sample.pm
index 674527e..4da9501 100644
--- a/lib/Krawfish/Compile/Segment/Sort/Sample.pm
+++ b/lib/Krawfish/Compile/Segment/Sort/Sample.pm
@@ -23,7 +23,7 @@
# A. Anagnostopoulos, A. Z. Broder, and D. Carmel. Sampling search-engine results. In Proc. of the Fourteenth International World Wide Web Conference, Chiba, Japan, 2005. ACM Press.
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Create a sample sort of k elements in the list
sub new {
diff --git a/lib/Krawfish/Index.pm b/lib/Krawfish/Index.pm
index 6ec16a5..1b34f7d 100644
--- a/lib/Krawfish/Index.pm
+++ b/lib/Krawfish/Index.pm
@@ -7,7 +7,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# May need to be renamed to Krawfish::Node
diff --git a/lib/Krawfish/Index/Dictionary.pm b/lib/Krawfish/Index/Dictionary.pm
index 26a9e93..e9f5885 100644
--- a/lib/Krawfish/Index/Dictionary.pm
+++ b/lib/Krawfish/Index/Dictionary.pm
@@ -172,7 +172,7 @@
# That's why all subterms need to be stored as well.
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Index/Fields/Direction.pm b/lib/Krawfish/Index/Fields/Direction.pm
index 941fa50..9bec3fa 100644
--- a/lib/Krawfish/Index/Fields/Direction.pm
+++ b/lib/Krawfish/Index/Fields/Direction.pm
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Index/Fields/Doc.pm b/lib/Krawfish/Index/Fields/Doc.pm
index 109466d..ca43993 100644
--- a/lib/Krawfish/Index/Fields/Doc.pm
+++ b/lib/Krawfish/Index/Fields/Doc.pm
@@ -5,7 +5,7 @@
# This is similar to Forward::Doc!
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Index/Fields/Pointer.pm b/lib/Krawfish/Index/Fields/Pointer.pm
index 6755c05..ec6ab87 100644
--- a/lib/Krawfish/Index/Fields/Pointer.pm
+++ b/lib/Krawfish/Index/Fields/Pointer.pm
@@ -6,7 +6,7 @@
use warnings;
use strict;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# API:
# ->next_doc
diff --git a/lib/Krawfish/Index/Fields/Rank.pm b/lib/Krawfish/Index/Fields/Rank.pm
index d88a2d6..3b931fa 100644
--- a/lib/Krawfish/Index/Fields/Rank.pm
+++ b/lib/Krawfish/Index/Fields/Rank.pm
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# Split ranks in asc_rank and desc_rank,
diff --git a/lib/Krawfish/Index/Fields/Ranks.pm b/lib/Krawfish/Index/Fields/Ranks.pm
index a5a7c51..a53f761 100644
--- a/lib/Krawfish/Index/Fields/Ranks.pm
+++ b/lib/Krawfish/Index/Fields/Ranks.pm
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# Instead of 'by()', implement
diff --git a/lib/Krawfish/Index/Forward.pm b/lib/Krawfish/Index/Forward.pm
index 4cf2f71..90b68c7 100644
--- a/lib/Krawfish/Index/Forward.pm
+++ b/lib/Krawfish/Index/Forward.pm
@@ -5,7 +5,7 @@
use warnings;
use strict;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# This represents a forward index of the data,
# accessible by document ID and subtoken offset.
diff --git a/lib/Krawfish/Index/Forward/Doc.pm b/lib/Krawfish/Index/Forward/Doc.pm
index c62db9a..6c5cb43 100644
--- a/lib/Krawfish/Index/Forward/Doc.pm
+++ b/lib/Krawfish/Index/Forward/Doc.pm
@@ -3,7 +3,7 @@
use warnings;
use strict;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
diff --git a/lib/Krawfish/Index/PostingPointer.pm b/lib/Krawfish/Index/PostingPointer.pm
index acc5519..62aaff9 100644
--- a/lib/Krawfish/Index/PostingPointer.pm
+++ b/lib/Krawfish/Index/PostingPointer.pm
@@ -8,7 +8,7 @@
use warnings;
use constant {
- DEBUG => 1,
+ DEBUG => 0,
DOC_ID => 0
};
diff --git a/lib/Krawfish/Index/Segment.pm b/lib/Krawfish/Index/Segment.pm
index 0c58e8b..e339cbd 100644
--- a/lib/Krawfish/Index/Segment.pm
+++ b/lib/Krawfish/Index/Segment.pm
@@ -36,7 +36,7 @@
# TODO:
# Which fields are sortable can be retrieved from the dictionary.
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Compile.pm b/lib/Krawfish/Koral/Compile.pm
index 22abedf..a543319 100644
--- a/lib/Krawfish/Koral/Compile.pm
+++ b/lib/Krawfish/Koral/Compile.pm
@@ -36,7 +36,7 @@
);
use constant {
- DEBUG => 1,
+ DEBUG => 0,
UNIQUE_FIELD => 'id'
};
diff --git a/lib/Krawfish/Koral/Compile/Aggregate.pm b/lib/Krawfish/Koral/Compile/Aggregate.pm
index 39930c2..fec24de 100644
--- a/lib/Krawfish/Koral/Compile/Aggregate.pm
+++ b/lib/Krawfish/Koral/Compile/Aggregate.pm
@@ -6,7 +6,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# Check that only valid aggregate objects are passed
diff --git a/lib/Krawfish/Koral/Compile/Enrich.pm b/lib/Krawfish/Koral/Compile/Enrich.pm
index 3f8f75c..eed3317 100644
--- a/lib/Krawfish/Koral/Compile/Enrich.pm
+++ b/lib/Krawfish/Koral/Compile/Enrich.pm
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
our %ENRICH_ORDER = (
'fields' => 1,
diff --git a/lib/Krawfish/Koral/Compile/Enrich/Snippet/Context/Span.pm b/lib/Krawfish/Koral/Compile/Enrich/Snippet/Context/Span.pm
index 45486d0..860a203 100644
--- a/lib/Krawfish/Koral/Compile/Enrich/Snippet/Context/Span.pm
+++ b/lib/Krawfish/Koral/Compile/Enrich/Snippet/Context/Span.pm
@@ -7,7 +7,7 @@
use warnings;
use constant {
- DEBUG => 1,
+ DEBUG => 0,
MAX_TOKENS => 4096
};
@@ -22,7 +22,7 @@
if ($term->term_type ne 'span') {
if (DEBUG) {
print_log(
- 'k_context_span',
+ 'k_ctx_span',
qq!Term "$term_str" is no span, but a ! . $term->term_type . '!'
);
};
@@ -56,7 +56,7 @@
$self->{anno_id} = $dict->term_id_by_term($term->to_term);
if (DEBUG) {
- print_log('k_context_span', 'Identify annotation for ' . $term->to_term);
+ print_log('k_ctx_span', 'Identify annotation for ' . $term->to_term);
};
# Term not found
@@ -66,13 +66,13 @@
$self->{foundry_id} = $dict->term_id_by_term(FOUNDRY_PREF . $term->foundry);
if (DEBUG) {
- print_log('k_context_span', 'Identify layer for ' . $term->foundry);
+ print_log('k_ctx_span', 'Identify layer for ' . $term->foundry);
};
$self->{layer_id} = $dict->term_id_by_term(LAYER_PREF . $term->layer);
if (DEBUG) {
- print_log('k_context_span', 'Identify layer for ' . $term->layer);
+ print_log('k_ctx_span', 'Identify layer for ' . $term->layer);
};
return $self;
diff --git a/lib/Krawfish/Koral/Compile/Node/Group.pm b/lib/Krawfish/Koral/Compile/Node/Group.pm
deleted file mode 100644
index 46f4188..0000000
--- a/lib/Krawfish/Koral/Compile/Node/Group.pm
+++ /dev/null
@@ -1,45 +0,0 @@
-package Krawfish::Koral::Compile::Node::Group;
-use Krawfish::Log;
-use strict;
-use warnings;
-
-use constant DEBUG => 1;
-
-warn 'DEPRECATED';
-
-
-sub new {
- my $class = shift;
-
- my $self = bless {
- query => shift,
- criterion => shift
- }, $class;
-};
-
-
-# Get identifiers
-sub identify {
- my ($self, $dict) = @_;
-
- $self->{query} = $self->{query}->identify($dict);
-
- $self->{criterion} = $self->{criterion}->identify($dict);
-
- # Field to group on is not existent or query matches nowhere
- if (!$self->{criterion} || !$self->{query}) {
- return Krawfish::Koral::Corpus::Nothing->new;
- };
-
- return $self;
-
-};
-
-
-sub to_string {
- my $self = shift;
- return 'group(' . $self->{criterion}->to_string . ':' . $self->{query}->to_string . ')';
-};
-
-
-1;
diff --git a/lib/Krawfish/Koral/Compile/Node/Limit.pm b/lib/Krawfish/Koral/Compile/Node/Limit.pm
index 3bc2dcd..0196824 100644
--- a/lib/Krawfish/Koral/Compile/Node/Limit.pm
+++ b/lib/Krawfish/Koral/Compile/Node/Limit.pm
@@ -9,7 +9,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Compile/Node/Sort.pm b/lib/Krawfish/Koral/Compile/Node/Sort.pm
index 2b552c2..77ecf59 100644
--- a/lib/Krawfish/Koral/Compile/Node/Sort.pm
+++ b/lib/Krawfish/Koral/Compile/Node/Sort.pm
@@ -7,10 +7,10 @@
use strict;
use warnings;
-use constant (
- DEBUG => 1,
+use constant {
+ DEBUG => 0,
UNIQUE => 'id'
-);
+};
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Compile/Sort.pm b/lib/Krawfish/Koral/Compile/Sort.pm
index 6746ef8..4c4dce6 100644
--- a/lib/Krawfish/Koral/Compile/Sort.pm
+++ b/lib/Krawfish/Koral/Compile/Sort.pm
@@ -7,7 +7,7 @@
use warnings;
use constant {
- DEBUG => 1,
+ DEBUG => 0,
UNIQUE_ID => 'id'
};
diff --git a/lib/Krawfish/Koral/Document.pm b/lib/Krawfish/Koral/Document.pm
index cb859f0..d8b9514 100644
--- a/lib/Krawfish/Koral/Document.pm
+++ b/lib/Krawfish/Koral/Document.pm
@@ -26,7 +26,7 @@
# foundry and layer may need separated term_ids so they are exceptional small.
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Parse the document and create an inverted index file
sub new {
diff --git a/lib/Krawfish/Koral/Document/FieldBase.pm b/lib/Krawfish/Koral/Document/FieldBase.pm
index 0657f20..f642bca 100644
--- a/lib/Krawfish/Koral/Document/FieldBase.pm
+++ b/lib/Krawfish/Koral/Document/FieldBase.pm
@@ -4,7 +4,7 @@
use warnings;
use strict;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# Probably use Krawfish::Koral::Compile::Type::KeyID and
diff --git a/lib/Krawfish/Koral/Document/FieldInt.pm b/lib/Krawfish/Koral/Document/FieldInt.pm
index e7ddef9..66423ad 100644
--- a/lib/Krawfish/Koral/Document/FieldInt.pm
+++ b/lib/Krawfish/Koral/Document/FieldInt.pm
@@ -7,7 +7,7 @@
use warnings;
use strict;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Class for integer fields
diff --git a/lib/Krawfish/Koral/Info.pm b/lib/Krawfish/Koral/Info.pm
index 882ef11..652e793 100644
--- a/lib/Krawfish/Koral/Info.pm
+++ b/lib/Krawfish/Koral/Info.pm
@@ -5,9 +5,9 @@
use Krawfish::Log;
# TODO:
-# Probably move to Krawfish::Koral::Info
+# Probably rename to Krawfish::Koral::Report
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Add error
sub error {
diff --git a/lib/Krawfish/Koral/Query/Constraints.pm b/lib/Krawfish/Koral/Query/Constraints.pm
index b573055..c8cba1e 100644
--- a/lib/Krawfish/Koral/Query/Constraints.pm
+++ b/lib/Krawfish/Koral/Query/Constraints.pm
@@ -12,7 +12,7 @@
memoize('min_span');
memoize('max_span');
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# TODO:
# Normalization phase can be optimized.
diff --git a/lib/Krawfish/Koral/Query/Exclusion.pm b/lib/Krawfish/Koral/Query/Exclusion.pm
index fb93715..0de469e 100644
--- a/lib/Krawfish/Koral/Query/Exclusion.pm
+++ b/lib/Krawfish/Koral/Query/Exclusion.pm
@@ -11,7 +11,7 @@
memoize('min_span');
memoize('max_span');
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Query/Filter.pm b/lib/Krawfish/Koral/Query/Filter.pm
index a7a6984..765d289 100644
--- a/lib/Krawfish/Koral/Query/Filter.pm
+++ b/lib/Krawfish/Koral/Query/Filter.pm
@@ -22,7 +22,7 @@
#
# next([Der],previous(filter(author=goethe,[Mann]),[alte&ADJ]))
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Query/Term.pm b/lib/Krawfish/Koral/Query/Term.pm
index cd65a4a..d789a23 100644
--- a/lib/Krawfish/Koral/Query/Term.pm
+++ b/lib/Krawfish/Koral/Query/Term.pm
@@ -23,7 +23,7 @@
# TODO:
# Rename to_term to to_neutral!
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Query/TermGroup.pm b/lib/Krawfish/Koral/Query/TermGroup.pm
index eef2546..c7bd61c 100644
--- a/lib/Krawfish/Koral/Query/TermGroup.pm
+++ b/lib/Krawfish/Koral/Query/TermGroup.pm
@@ -63,7 +63,7 @@
# {1:[marmot/m=case:dat]}|{2:[marmot/m=gender:masc]}|{3:[marmot/m=number:sg]}
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Koral/Result/Aggregate/Fields.pm b/lib/Krawfish/Koral/Result/Aggregate/Fields.pm
index b97e663..79ff8eb 100644
--- a/lib/Krawfish/Koral/Result/Aggregate/Fields.pm
+++ b/lib/Krawfish/Koral/Result/Aggregate/Fields.pm
@@ -22,7 +22,7 @@
# TODO:
# Rename stringifications to aFields!
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub new {
my $class = shift;
diff --git a/lib/Krawfish/Posting/Bundle.pm b/lib/Krawfish/Posting/Bundle.pm
index 5de8595..cb0e5eb 100644
--- a/lib/Krawfish/Posting/Bundle.pm
+++ b/lib/Krawfish/Posting/Bundle.pm
@@ -16,7 +16,7 @@
# TODO:
# Make unbundle() an iterator!
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Constructor
sub new {
diff --git a/lib/Krawfish/Posting/Forward.pm b/lib/Krawfish/Posting/Forward.pm
index eb2c668..fc65687 100644
--- a/lib/Krawfish/Posting/Forward.pm
+++ b/lib/Krawfish/Posting/Forward.pm
@@ -25,7 +25,7 @@
# forward stream can correctly be interpreted.
# Or use Krawfish::Koral::Document::Annotation
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Constructor
sub new {
diff --git a/lib/Krawfish/Query.pm b/lib/Krawfish/Query.pm
index b1ee8d2..e87eecb 100644
--- a/lib/Krawfish/Query.pm
+++ b/lib/Krawfish/Query.pm
@@ -4,7 +4,7 @@
use strict;
use warnings;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
# Current span object
sub current {
diff --git a/lib/Krawfish/Util/PatternList.pm b/lib/Krawfish/Util/PatternList.pm
index 0020eea..a3b3ad0 100644
--- a/lib/Krawfish/Util/PatternList.pm
+++ b/lib/Krawfish/Util/PatternList.pm
@@ -23,7 +23,7 @@
our @EXPORT = qw/pattern_list/;
-use constant DEBUG => 1;
+use constant DEBUG => 0;
sub pattern_list {