You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WORD ^1 : /\b\p{L}+\b/;
KnownName = sequence_imm( firstName = "Hans" WORD, lastName = WORD );
Let's assume we have a list of known first names in a dictionary, so how can we make
sure we match exactly those as symbols in firstName?
The two options I can come up with, don't look too nice:
WORD ^1 : /\b\p{L}+\b/;
KnownName = sequence_imm( firstName = "Albert" WORD, lastName = WORD );
KnownName = sequence_imm( firstName = "Hans" WORD, lastName = WORD );
...
KnownName = sequence_imm( firstName = "Werner" WORD, lastName = WORD );
or even worse:
WORD ^1 : /\b\p{L}+\b/;
FIRST : /\b((Albert)|(Hans)|(Werner))\b/;
KnownName = sequence_imm( firstName = FIRST, lastName = WORD );
Allowing an API there and providing a dictionary for instance allows to filter for known
items.
I could also imagine an interface to a "SELECT first FROM known_customers" into a
database. Of course the question is, how far things should be done in the CLIs like
strusPatternMatcher and when you should use the APIs to do the filtering as a
subcomponent along to database and other processing.
The text was updated successfully, but these errors were encountered:
A database could be used in a post-filtering of candidates selected by pattern matching.
To query a database in the pattern matcher is not a real option.
The solution to the first problem could be a set of rules for the prename.
KnownFirstName = any( WORD "Albert",
WORD "Hans",
....
WORD "Werner",
WORD "Zora" );
KnownName = sequence_imm(
firstName = KnownFirstName,
lastName = WORD );
In the following example:
Let's assume we have a list of known first names in a dictionary, so how can we make
sure we match exactly those as symbols in firstName?
The two options I can come up with, don't look too nice:
or even worse:
Allowing an API there and providing a dictionary for instance allows to filter for known
items.
I could also imagine an interface to a "SELECT first FROM known_customers" into a
database. Of course the question is, how far things should be done in the CLIs like
strusPatternMatcher and when you should use the APIs to do the filtering as a
subcomponent along to database and other processing.
The text was updated successfully, but these errors were encountered: