knowitall / taggers

Easily identify and label sentence intervals using various taggers.
11 stars 12 forks source link

No output of CatTagger from the following #6

Closed SSoderland closed 11 years ago

SSoderland commented 11 years ago
AnimalTagger := KeywordTagger {
  cat
  dog
  frog
}
CatTagger := PatternTagger {
  <string='the'> (<a1>:<type='AnimalTagger'>+) <string='and'>  (<a2>:<type='AnimalTagger'>+)
}

Sentence: The cat and the dog sat on the floor.

schmmd commented 11 years ago

The problem is that your regular expression does not match "the" before "dog". Try the following sentence:

The cat and dog sat on the floor.

KeywordTagger(AnimalTagger)
PatternTagger(CatTagger)

The cat and dog sat on the floor.
AnimalTagger{{1}:cat}
AnimalTagger{{3}:dog}
CatTagger{[0, 4):The cat and dog}
CatTagger.a1{{1}:cat}
CatTagger.a2{{3}:dog}
SSoderland commented 11 years ago

Thanks. It works fine.

-- Stephen Soderland

CSE 332  (206) 685-9143

From: Michael Schmitz [mailto:notifications@github.com] Sent: Wednesday, September 25, 2013 12:52 PM To: knowitall/taggers Cc: SSoderland Subject: Re: [taggers] No output of CatTagger from the following (#6)

The problem is that your regular expression does not match "the" before "dog". Try the following sentence:

The cat and dog sat on the floor.

KeywordTagger(AnimalTagger) PatternTagger(CatTagger)

The cat and dog sat on the floor. AnimalTagger{{1}:cat} AnimalTagger{{3}:dog} CatTagger{[0, 4):The cat and dog} CatTagger.a1{{1}:cat} CatTagger.a2{{3}:dog}

— Reply to this email directly or view it on GitHub https://github.com/knowitall/taggers/issues/6#issuecomment-25119076 .Image removed by sender.