Minor changes to document
diff --git a/lib/Krawfish/Koral/Document.pm b/lib/Krawfish/Koral/Document.pm
index 0a466a8..9dcb7c9 100644
--- a/lib/Krawfish/Koral/Document.pm
+++ b/lib/Krawfish/Koral/Document.pm
@@ -11,8 +11,8 @@
return $self unless @_;
my $koral = shift;
- if ($koral->{content}) {
- $self->content($koral->{content});
+ if ($koral->{primaryData}) {
+ $self->primary_data($koral->{primaryData});
};
# Parse segments
@@ -23,11 +23,11 @@
};
# Parse annotations
- if ($koral->{annotation}) {
+ if ($koral->{annotations}) {
# TODO: All annotations need to be wrapped
my @annotations = ();
- foreach my $item (@{$koral->{annotation}}) {
+ foreach my $item (@{$koral->{annotations}}) {
if ($item->{'@type'} eq 'koral:token') {
my $token = Krawfish::Koral::Query::Token->new($item);
@@ -42,12 +42,12 @@
# Primary data
-sub content {
+sub primary_data {
my $self = shift;
if (@_) {
- $self->{content} = shift;
+ $self->{primary_data} = shift;
};
- return $self->{content};
+ return $self->{primary_data};
};
diff --git a/lib/Krawfish/Koral/Query.pm b/lib/Krawfish/Koral/Query.pm
index 5da9d0f..c16136e 100644
--- a/lib/Krawfish/Koral/Query.pm
+++ b/lib/Krawfish/Koral/Query.pm
@@ -23,19 +23,15 @@
# Token construct
+# Should probably be like:
+# ->token('Der') or
+# ->token(->term_or('Der', 'Die', 'Das'))
sub token {
shift;
return Krawfish::Koral::Query::Token->new(@_);
};
-# TokenGroup construct
-sub token_group {
- shift;
- return Krawfish::Koral::Query::TokenGroup->new(@_);
-};
-
-
# Span construct
sub span {
shift;