RightFielder Object:Config Example: Difference between revisions
Line 48: | Line 48: | ||
==Example mdRightFielder.cfg Overrides== | ==Example mdRightFielder.cfg Overrides== | ||
[PreProcessRegEx] | <nowiki/>;[PreProcessRegEx] <br> | ||
4,(?<=^| |[|]|\t|\r|\n)(.*)(a/o|A/O|c/o|C/O)(.*)(?=$| |[|]|\t|\r|\n),$1 | $3 | <nowiki/>;4,(?<=^| |[|]|\t|\r|\n)(.*)(a/o|A/O|c/o|C/O)(.*)(?=$| |[|]|\t|\r|\n),$1 | $3 <br> | ||
This expression will allow you to identify ‘XYZ Corporation a/o Billy McMailreceiver’ as | <nowiki/>;This expression will allow you to identify ‘XYZ Corporation a/o Billy McMailreceiver’ as <br> | ||
<nowiki/>; Name1: Billy McMailreceiver <br> | |||
<nowiki/>; Company1: XYZ Corporation <br> | |||
Without this expression the output will be… | <nowiki/>;Without this expression the output will be… <br> | ||
<nowiki/>; Company1: XYZ Corporation a/o Billy McMailreceiver <br> | |||
<nowiki/>;[LeftToken] | <nowiki/>;[LeftToken] <br> | ||
<nowiki/>;; these entries help uncommon names get recognized as names | <nowiki/>;; these entries help uncommon names get recognized as names <br> | ||
<nowiki/>;SMOKY THE BEAR,F | <nowiki/>;SMOKY THE BEAR,F <br> | ||
<nowiki/>;DONTRELL,F | <nowiki/>;DONTRELL,F <br> | ||
<nowiki/>;BOGDAN,F | <nowiki/>;BOGDAN,F <br> | ||
<nowiki/>;; many tokens which appear to identify departments are actually entered as Company identifiers by default. | <nowiki/>;; many tokens which appear to identify departments are actually entered as Company identifiers by default. <br> | ||
<nowiki/>;; the following entries create distinct department identifiers , overriding tokens sometimes present in companies | <nowiki/>;; the following entries create distinct department identifiers , overriding tokens sometimes present in companies <br> | ||
<nowiki/>;IT DEPARTMENT,T | <nowiki/>;IT DEPARTMENT,T <br> | ||
<nowiki/>;SALES DEPARTMENT, T | <nowiki/>;SALES DEPARTMENT, T <br> | ||
<nowiki/>;QA, T | <nowiki/>;QA, T <br> | ||
<nowiki/>;[RightToken] | <nowiki/>;[RightToken] <br> | ||
<nowiki/>;; this expands identification of unheard of, changed, or vanity city names | <nowiki/>;; this expands identification of unheard of, changed, or vanity city names <br> | ||
<nowiki/>;ANYTOWN,T,,100 | <nowiki/>;ANYTOWN,T,,100 <br> | ||
<nowiki/>;; alternate spelling or fictional country | <nowiki/>;; alternate spelling or fictional country <br> | ||
<nowiki/>;SHIRE,I,, | <nowiki/>;SHIRE,I,, <br> | ||
<nowiki/>;[PhoneTypeToken] | <nowiki/>;[PhoneTypeToken] <br> | ||
<nowiki/>;; yesterdays or tomorrows phone identifiers | <nowiki/>;; yesterdays or tomorrows phone identifiers <br> | ||
<nowiki/>;MOBILE | <nowiki/>;MOBILE <br> | ||
<nowiki/>;PAGER | <nowiki/>;PAGER <br> | ||
<nowiki/>;BLACKBERRY | <nowiki/>;BLACKBERRY <br> | ||
==NOTES on cfg overrides== | ==NOTES on cfg overrides== |
Revision as of 18:34, 24 February 2014
mdRightFielder.cfg Case Studies
The mdRightFielder.cfg file is a plain text file that users can use to override the default entries contained in the mdRightFielder.dat data file.
For complete instructions of available tables and types which can be overridden, as well as syntax and examples, open the mdRightFielder.cfg in a text editor and follow the instructions.
There are 3 types of modifications that can be made in mdRightFielder.cfg:
Lookup Table Overrides
This is the addition or removal of words (and phrases) to the Object’s dictionaries. This essentially expands (or limits) Right Fielder’s vocabulary.
There are three lookup tables in Right Fielder Object:
- LeftToken – used to recognize words and phrases that usually appear at the start of data (name, company, titles)
- MiddleToken – used to recognize words and phrases that usually appear at the middle of the data (addresses, apartments, PO Boxes, etc)
- RightToken – used to recognize words and phrases that usually appear at the end of data (city, state, country)
Example: You're processing a database of car dealerships and the company recognition isn’t fielding car companies correctly. Processing might be a lot more accurate if you would modify the LeftToken table in this way:
[LeftToken]
FORD,C
TOYOTA,C
CHEVY,C
NISSAN,C
KIA,C
HONDA,C
LINCOLN,C
ALFA ROMEO,C
MOTORS,C
Notes:
- It is not necessary for the entries to be sorted.
- These entries will override any existing dictionary entries (for example, ‘LINCOLN’ is by default a First Name indicator). The second field, containing the ‘C’ indicates what kind of word is being described (it’s ‘token’).
- Only one token can be used per entry. Each table has different tokens that can be used in it, see the mdRightFielder.cfg for details.
Regular Expression Overrrides
The addition of regular expressions that are used to recognize specific character patterns (for example, phone numbers, e-mails, etc).
Regular expression are used to recognize postal codes, e-mail addresses, phone numbers and URLs. These are types of data that can’t well be recognized using a dictionary, but the actual pattern of numbers, letters and punctuation is very useful in identifying the data. For example, Canadian Postal Codes always follow the pattern alpha-digit-alpha-digit-alpha-digit. They are recognized with the regular expression:
Pattern Table Overrides
The addition or removal of patterns of words and phrases. Words and phrases are first identified via Lookup Tables and assigned tokens (specified in the Lookup Table itself). Sequences of tokens (patterns) are matched to entries in this table and transformed into output data.
Example mdRightFielder.cfg Overrides
;[PreProcessRegEx]
;4,(?<=^| |[|]|\t|\r|\n)(.*)(a/o|A/O|c/o|C/O)(.*)(?=$| |[|]|\t|\r|\n),$1 | $3
;This expression will allow you to identify ‘XYZ Corporation a/o Billy McMailreceiver’ as
; Name1: Billy McMailreceiver
; Company1: XYZ Corporation
;Without this expression the output will be…
; Company1: XYZ Corporation a/o Billy McMailreceiver
;[LeftToken]
;; these entries help uncommon names get recognized as names
;SMOKY THE BEAR,F
;DONTRELL,F
;BOGDAN,F
;; many tokens which appear to identify departments are actually entered as Company identifiers by default.
;; the following entries create distinct department identifiers , overriding tokens sometimes present in companies
;IT DEPARTMENT,T
;SALES DEPARTMENT, T
;QA, T
;[RightToken]
;; this expands identification of unheard of, changed, or vanity city names
;ANYTOWN,T,,100
;; alternate spelling or fictional country
;SHIRE,I,,
;[PhoneTypeToken]
;; yesterdays or tomorrows phone identifiers
;MOBILE
;PAGER
;BLACKBERRY