en/AdvancedNlpCourse2017/InformationExtraction: jobtitleperson.jape

File jobtitleperson.jape, 649 bytes (added by Ales Horak, 19 months ago)
Line 
1Phase: JobtitlePerson
2Input: Lookup Person Jobtitle Token
3Options: control = appelt debug = true 
4
5Rule: JobtitlePerson1
6(
7 {Lookup.majorType == jobtitle, !Lookup.majorType == organization}
8 (
9    {Lookup.majorType == jobtitle, !Lookup.majorType == organization}
10 )?
11 ({Token})[0,7]
12 ({Person})
13)
14:jobtitleperson
15-->
16 :jobtitleperson.JobTitlePerson = {rule = "JobTitle1"}
17
18
19Rule: JobtitlePerson2
20(
21 ({Person})
22 ({Token})[0,5]
23 {Lookup.majorType == jobtitle, !Lookup.majorType == organization}
24 (
25    {Lookup.majorType == jobtitle, !Lookup.majorType == organization}
26 )?
27)
28:jobtitleperson
29-->
30 :jobtitleperson.JobTitlePerson = {rule = "JobTitle2"}
31