-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from pelias/joxit/person-composite-classifier
Add person composite classifier
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
const PersonClassification = require('../../classification/PersonClassification') | ||
const GivenNameClassification = require('../../classification/GivenNameClassification') | ||
|
||
module.exports = [ | ||
{ | ||
// Anne Marie | ||
confidence: 0.25, | ||
Class: GivenNameClassification, | ||
scheme: [ | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'StreetPrefixClassification', 'StopWordClassification'] | ||
} | ||
] | ||
}, | ||
{ | ||
// Georges Bizet | ||
confidence: 0.5, | ||
Class: PersonClassification, | ||
scheme: [ | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['SurnameClassification'], | ||
not: ['StreetClassification', 'StreetPrefixClassification', 'StopWordClassification'] | ||
} | ||
] | ||
}, | ||
{ | ||
// Rose de Lima | ||
confidence: 0.5, | ||
Class: PersonClassification, | ||
scheme: [ | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['StopWordClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['SurnameClassification'], | ||
not: ['StreetClassification', 'StreetPrefixClassification', 'StopWordClassification'] | ||
} | ||
] | ||
}, | ||
{ | ||
// Unknown surname | ||
confidence: 0.1, | ||
Class: PersonClassification, | ||
scheme: [ | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['AlphaClassification'], | ||
not: ['StreetClassification', 'StreetPrefixClassification', 'StopWordClassification'] | ||
} | ||
] | ||
}, | ||
{ | ||
// Unknown surname | ||
confidence: 0.1, | ||
Class: PersonClassification, | ||
scheme: [ | ||
{ | ||
is: ['GivenNameClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['StopWordClassification'], | ||
not: ['StreetClassification', 'IntersectionClassification'] | ||
}, | ||
{ | ||
is: ['AlphaClassification'], | ||
not: ['StreetClassification', 'StreetPrefixClassification', 'StopWordClassification'] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters