Matcher - SpVar Pattern
I. Introduction
From our osverbation, if n-grams of a term that matches spVar pattern in the n-gram set, they are good candidates of MWEs.Spelling variants are usually looks alike and sounds alike as shown in the following example:
EUI | Examples | Difference | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
E0055858 |
|
A spVar model, including over 10 spelling variant types, has been developed to identify spVars in a corpus. This model was tested on LRSPL (recall), tested on Lexicon (recall and precision), and then apply on MEDLINE.
II. Models
The following algorithm is used to retrieve N-grams that match spVar patterns:
III. Processes
shell> ./08.MatcherSpVar ${YEAR}
Step | Description | Inputs | Outputs | Notes - Examples | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unit Tests for SpVar software compoments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | Unit Test: SpVar Norm
SpVarNorm.java
| None | normStr of sample Str | Unit test on spVar norm
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | Unit Test: Metaphone
Metaphone.java
| None | metaphone of sample Str | Unit test on metaphone
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | Unit Test: Edit Distance
EditDistance.java
| None | edit distance of 2 sample Strs | Unit test on edit distance
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | Unit Test: Sorted Distance
SortedDistance.java
| None | sorted distance between sample Strs in a set of input terms | Unit test on sorted distance
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Utility Tests for SpVar software compoments | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | SpVar on norm|Metaphone|Edit distance ..
TestSpVarOnNormMpEd.java
| None | norm|Metaphone|EditDistance | Show results of two inStrs
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | GroupSpVarByNorm ..
GetStdAndSpVarsFromLRSPL.java
GroupSpVarByNorm.java
|
|
| Retrieve LMW from LRSPL by spVarNorm
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | GroupSpVarByMES ..
GroupSpVarByMES.java
|
|
| Retrieve LMW from results of step-11 by MES
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | GroupSpVarByES ..
GroupSpVarByES.java
|
|
| Retrieve LMW from results of step-12 by ES
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | PrintOutSpVars ..
PrintOutSpVars.java
|
| Split and print out spVars to single and spVars
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | GetNormSpVarsTable ..
GetNormSpVarsTable.java
|
|
| Get a norm spVar|spVars table from a file (terms or n-grams)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Analysis: Test on LRSPL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | Convert file format from LRSP .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | Get SpVar from LRSPL - ByNorm .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | Get SpVar from LRSPL - ByMES (ED:2) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | Get SpVar from LRSPL - ByES (ED:1) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | Get SpVar from LRSPL - ByMES (ED:3) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
25 | Get SpVar from LRSPL - ByES (ED:2) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
26 | Get SpVar from LRSPL - ByMES (ED:4) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 | Print result of step 26 - ByMES (ED:4) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 | Test SpVar matcher on LRSPL - (Steps: 21-26) .. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | Analysis: GetSpVarTypeFromLRSPL ..
GetSpVarTypeFromLRSPL.java
|
|
| Analyze types of spVars:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Analysis: Test on Lexicon (inflVars.data) for AMIA paper Table-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
30 | Get inflectional SpVar from Lexicon
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
31 | Get gold standard for SpVars from Lexicon
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
32 | Get SpVar from Lex - ByNorm
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33 | Get SpVar from Lex - ByMES (ED:2)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33A,B,C,D,E | Get SpVar from Lex - ByM2ES, M3ES, C2ES, M2CES, M3CES (ED:2)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
34 | Get SpVar from Lex - ByES (ED:1)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
35 | Get SpVar from Lex - ByMES (ED:3)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
36 | Get SpVar from Lex - ByES (ED:2)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | Get SpVar from Lex - ByMES (ED:4)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | Get PRF for above tests (Must complete steps: 31-36) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pre-Process | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
40 | Group nGrams by core-term
GroupByCoreTerm.java
Same as use otpion 11 of 6.NGramUtil |
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | Get terms from nGramSet (filtered by WC, sorted)
NGramWcTermFilter.java
|
|
| Filter by WC (default 150) and sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Process: Apply spVar on MEDLINE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
50 | Apply SpVar on Medline - ByNorm
|
| ./${YEAR}/outData/08.MatcherSpVar/Medline/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51 | Apply SpVar on Medline - ByM2CES
| ./${YEAR}/outData/08.MatcherSpVar/Medline/
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51A | Print out SpVarClass results of Step-51 to files
|