Add out.tsv

This commit is contained in:
Iwona Christop 2022-05-03 22:16:45 +02:00
parent b9815844a4
commit 8bd6c9871a
4 changed files with 551 additions and 10 deletions

83
dev-0/out.tsv Normal file
View File

@ -0,0 +1,83 @@
effective_date=2014-05-20 jurisdiction=New_York
effective_date=2012-06-21 jurisdiction=Georgia party=An_Electric_Membership_Corporation
jurisdiction=Delaware term=2_years
effective_date=2007-01-23 jurisdiction=Massachusetts
jurisdiction=Delaware
jurisdiction=Washington party=Schneider
jurisdiction=Delaware
jurisdiction=New_Hampshire party=Nat_Krishnamurti party=Interpace_Diagnostics_Group party=Interpace_Diagnostics_Corporation
jurisdiction=New_York
effective_date=2015-11-11
""
jurisdiction=Delaware
jurisdiction=Delaware
effective_date=2000-05-23 jurisdiction=Delaware
jurisdiction=New_York
jurisdiction=Massachusetts
effective_date=2008-07-31 jurisdiction=California
jurisdiction=California
jurisdiction=New_York
effective_date=2017-07-11 jurisdiction=California
""
jurisdiction=California
jurisdiction=Virginia party=The_Corporation
""
""
jurisdiction=Indiana
jurisdiction=New_Jersey
jurisdiction=California
jurisdiction=Delaware term=2_years
jurisdiction=Georgia
jurisdiction=Delaware
effective_date=2015-06-23 jurisdiction=New_York
jurisdiction=California
""
jurisdiction=California
""
party=Target_Corporation party=Sears_Holdings_Corporation
jurisdiction=Ohio
jurisdiction=Massachusetts
jurisdiction=California
effective_date=2000-02-10
jurisdiction=California
jurisdiction=Delaware
jurisdiction=Illinois
""
effective_date=2010-06-23 jurisdiction=Texas
jurisdiction=New_Jersey
jurisdiction=Delaware party=LaserCard_Corporation
effective_date=2001-01-26 jurisdiction=Washington
jurisdiction=Georgia
effective_date=2014-11-26 jurisdiction=Delaware
jurisdiction=Oregon
jurisdiction=California
effective_date=2012-06-11 jurisdiction=Delaware
jurisdiction=Delaware
jurisdiction=Massachusetts
jurisdiction=California party=Life\nTechnologies_Corporation party=Invitrogen_Corporation
effective_date=2012-09-20 party=Contran_Corporation
jurisdiction=Delaware
effective_date=2008-09-15 jurisdiction=Illinois party=Paul_B._Mulhollem party=Paul_B._Mulhollem\nPAUL_B._MULHOLLEM\nDated:_September_29
""
jurisdiction=Ohio term=2_years
jurisdiction=California
jurisdiction=New_York
jurisdiction=California
effective_date=2015-03-16 jurisdiction=Utah
""
jurisdiction=Washington
jurisdiction=Virginia
jurisdiction=New_York
jurisdiction=New_York party=Eurand_N.V.
jurisdiction=Illinois
jurisdiction=California
""
""
effective_date=2011-03-29 jurisdiction=Texas term=2_years
effective_date=2011-05-26 jurisdiction=California
jurisdiction=Washington party=Digital_River
jurisdiction=Delaware
jurisdiction=Washington
effective_date=2011-01-18 jurisdiction=New_York term=2_years
jurisdiction=Washington party=James_B._Bucher
jurisdiction=Illinois
1 effective_date=2014-05-20 jurisdiction=New_York
2 effective_date=2012-06-21 jurisdiction=Georgia party=An_Electric_Membership_Corporation
3 jurisdiction=Delaware term=2_years
4 effective_date=2007-01-23 jurisdiction=Massachusetts
5 jurisdiction=Delaware
6 jurisdiction=Washington party=Schneider
7 jurisdiction=Delaware
8 jurisdiction=New_Hampshire party=Nat_Krishnamurti party=Interpace_Diagnostics_Group party=Interpace_Diagnostics_Corporation
9 jurisdiction=New_York
10 effective_date=2015-11-11
11
12 jurisdiction=Delaware
13 jurisdiction=Delaware
14 effective_date=2000-05-23 jurisdiction=Delaware
15 jurisdiction=New_York
16 jurisdiction=Massachusetts
17 effective_date=2008-07-31 jurisdiction=California
18 jurisdiction=California
19 jurisdiction=New_York
20 effective_date=2017-07-11 jurisdiction=California
21
22 jurisdiction=California
23 jurisdiction=Virginia party=The_Corporation
24
25
26 jurisdiction=Indiana
27 jurisdiction=New_Jersey
28 jurisdiction=California
29 jurisdiction=Delaware term=2_years
30 jurisdiction=Georgia
31 jurisdiction=Delaware
32 effective_date=2015-06-23 jurisdiction=New_York
33 jurisdiction=California
34
35 jurisdiction=California
36
37 party=Target_Corporation party=Sears_Holdings_Corporation
38 jurisdiction=Ohio
39 jurisdiction=Massachusetts
40 jurisdiction=California
41 effective_date=2000-02-10
42 jurisdiction=California
43 jurisdiction=Delaware
44 jurisdiction=Illinois
45
46 effective_date=2010-06-23 jurisdiction=Texas
47 jurisdiction=New_Jersey
48 jurisdiction=Delaware party=LaserCard_Corporation
49 effective_date=2001-01-26 jurisdiction=Washington
50 jurisdiction=Georgia
51 effective_date=2014-11-26 jurisdiction=Delaware
52 jurisdiction=Oregon
53 jurisdiction=California
54 effective_date=2012-06-11 jurisdiction=Delaware
55 jurisdiction=Delaware
56 jurisdiction=Massachusetts
57 jurisdiction=California party=Life\nTechnologies_Corporation party=Invitrogen_Corporation
58 effective_date=2012-09-20 party=Contran_Corporation
59 jurisdiction=Delaware
60 effective_date=2008-09-15 jurisdiction=Illinois party=Paul_B._Mulhollem party=Paul_B._Mulhollem\nPAUL_B._MULHOLLEM\nDated:_September_29
61
62 jurisdiction=Ohio term=2_years
63 jurisdiction=California
64 jurisdiction=New_York
65 jurisdiction=California
66 effective_date=2015-03-16 jurisdiction=Utah
67
68 jurisdiction=Washington
69 jurisdiction=Virginia
70 jurisdiction=New_York
71 jurisdiction=New_York party=Eurand_N.V.
72 jurisdiction=Illinois
73 jurisdiction=California
74
75
76 effective_date=2011-03-29 jurisdiction=Texas term=2_years
77 effective_date=2011-05-26 jurisdiction=California
78 jurisdiction=Washington party=Digital_River
79 jurisdiction=Delaware
80 jurisdiction=Washington
81 effective_date=2011-01-18 jurisdiction=New_York term=2_years
82 jurisdiction=Washington party=James_B._Bucher
83 jurisdiction=Illinois

21
main.py
View File

@ -114,28 +114,29 @@ def getTerm(document):
if __name__ == '__main__':
NDAs = readInput('train/in.tsv.xz')
NDAs = readInput('test-A/in.tsv.xz')
ner = spacy.load('NER')
predicted = [''] * len(NDAs)
document = ner(NDAs[9])
predicted = []
for i in range(len(NDAs)):
document = ner(NDAs[i])
document = ner(NDAs[i].replace('\n', ' '))
predict = ''
ed = getEffectiveDate(document)
j = getJurisdiction(document)
p = getParties(document)
t = getTerm(document)
if len(ed) > 0: predicted[i] += 'effective_date=' + ed + ' '
if len(j) > 0: predicted[i] += 'jurisdiction=' + j + ' '
if len(ed) > 0: predict += 'effective_date=' + ed + ' '
if len(j) > 0: predict += 'jurisdiction=' + j + ' '
if len(p) > 0:
for party in p: predicted[i] += 'party=' + party + ' '
if len(t) > 0: predicted[i] += 'term=' + t
for party in p: predict += 'party=' + party + ' '
if len(t) > 0: predict += 'term=' + t
with open('train/out.tsv', 'w', newline='') as f:
predicted.append([predict])
with open('test-A/out.tsv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerows(predicted)

203
test-A/out.tsv Normal file
View File

@ -0,0 +1,203 @@
jurisdiction=Ohio
jurisdiction=California
jurisdiction=Indiana
effective_date=2007-03-28 jurisdiction=New_York term=2_years
jurisdiction=Nevada
effective_date=2010-07-16 jurisdiction=Utah
""
jurisdiction=California
jurisdiction=Delaware
effective_date=2008-06-25 jurisdiction=New_York
jurisdiction=California
jurisdiction=Delaware term=3_years
jurisdiction=New_York party=Central_European_Distribution_Corporation
effective_date=2017-07-20 jurisdiction=Georgia
jurisdiction=Texas party=Open_Text_Corporation
effective_date=2008-04-16 jurisdiction=California
"jurisdiction=Washington party=L._Schneider, party=Schneider "
""
jurisdiction=Florida
""
jurisdiction=Florida
jurisdiction=New_York
jurisdiction=California
jurisdiction=Florida
jurisdiction=New_York
jurisdiction=Washington party=ELECTRONIC_ARTS
jurisdiction=Texas
jurisdiction=Delaware
jurisdiction=Georgia party=American_Tower_Corporation
jurisdiction=Washington
effective_date=2012-01-11 jurisdiction=Delaware
""
jurisdiction=California party=Rovi_Corporation party=Sonic_Solutions
jurisdiction=California
""
jurisdiction=California party=CVS_Caremark_Corporation
jurisdiction=Virginia
effective_date=2014-01-28 jurisdiction=Delaware
jurisdiction=Florida
jurisdiction=California
jurisdiction=Virginia
effective_date=2010-07-23 jurisdiction=Pennsylvania
effective_date=2010-01-25 jurisdiction=Delaware
jurisdiction=Washington
jurisdiction=Virginia
jurisdiction=California
""
effective_date=2000-03-28 jurisdiction=Pennsylvania
jurisdiction=New_Jersey
jurisdiction=Illinois
""
jurisdiction=Massachusetts
jurisdiction=Washington
jurisdiction=New_York
""
jurisdiction=Pennsylvania
jurisdiction=Pennsylvania
jurisdiction=California
effective_date=2001-09-17 jurisdiction=Georgia
jurisdiction=Delaware term=2_years
effective_date=2018-04-10 jurisdiction=Delaware
jurisdiction=Massachusetts
jurisdiction=Connecticut
effective_date=2006-05-11 jurisdiction=California
jurisdiction=Texas
jurisdiction=Delaware
jurisdiction=Virginia party=Peter_Federico
effective_date=2013-11-18
jurisdiction=Washington
""
party=The_Corporation
jurisdiction=Texas
""
""
effective_date=2017-05-24 jurisdiction=Nevada
jurisdiction=New_York
jurisdiction=Delaware party=Sprint_Corporation
jurisdiction=Illinois
effective_date=2014-12-22 jurisdiction=New_York
effective_date=2012-01-27 jurisdiction=New_York term=18_months
jurisdiction=Florida
jurisdiction=Virginia party=L._Waechter_CACI_International
jurisdiction=New_York
effective_date=2005-09-19 jurisdiction=Nevada party=MIKOHN_GAMING_CORPORATION
effective_date=2016-11-17 jurisdiction=Delaware
jurisdiction=New_Jersey
""
jurisdiction=Georgia party=EFCO_Corporation
""
jurisdiction=California party=Laboratory_Corporation_of_America_Holdings party=Laboratory_Corporation
jurisdiction=Missouri
jurisdiction=Florida
effective_date=2015-08-26 jurisdiction=Washington
jurisdiction=Ohio
effective_date=2004-03-17 jurisdiction=New_York
jurisdiction=Georgia
jurisdiction=New_York
jurisdiction=New_York
""
jurisdiction=California
party=Telco_Solutions
jurisdiction=Ohio
""
jurisdiction=California
jurisdiction=California
jurisdiction=Connecticut
effective_date=2019-02-14
effective_date=2016-11-17 jurisdiction=Delaware
effective_date=2019-01-16 jurisdiction=Utah
jurisdiction=California term=18_months
jurisdiction=Utah
""
jurisdiction=New_York
jurisdiction=New_York
effective_date=2002-02-28 jurisdiction=California party=SignalSoft_Corporation
effective_date=2013-07-29 jurisdiction=New_York
effective_date=2006-04-21 jurisdiction=Virginia
jurisdiction=Massachusetts
effective_date=2006-07-18 jurisdiction=Texas term=2_years
jurisdiction=Massachusetts
effective_date=2007-04-23
effective_date=2018-04-26 jurisdiction=New_York
party=Flagstar_Bancorp
jurisdiction=Pennsylvania
jurisdiction=New_York
jurisdiction=New_Jersey
effective_date=2011-05-27 jurisdiction=Texas
""
jurisdiction=Ohio
jurisdiction=Oregon
effective_date=2014-07-15 jurisdiction=New_Jersey party=Realogy_Group_LLC
effective_date=1999-04-29 jurisdiction=Florida
jurisdiction=Oregon
jurisdiction=Massachusetts
jurisdiction=Ohio
jurisdiction=California term=18_months
""
jurisdiction=Indiana
jurisdiction=California
effective_date=2012-05-21 jurisdiction=Virginia party=Donald_H._Layton\nDate:\nMay
""
effective_date=2009-02-16 jurisdiction=Delaware
party=2212421\n(Federal_ID#
jurisdiction=Pennsylvania party=Ikonics_Corporation
jurisdiction=Ohio
effective_date=1994-07-11 jurisdiction=California
jurisdiction=New_Jersey
""
""
jurisdiction=Virginia party=The_Corporation
""
""
jurisdiction=Delaware party=Chugai_Pharmaceutical_Co.
effective_date=2006-02-28 jurisdiction=New_York
jurisdiction=California
""
effective_date=2009-01-15 jurisdiction=Texas party=1st
effective_date=2007-11-30 jurisdiction=Georgia
effective_date=1998-09-22 jurisdiction=New_York
effective_date=2012-01-27 jurisdiction=New_York term=18_months
jurisdiction=Oregon
jurisdiction=Nevada
jurisdiction=California
""
effective_date=2008-03-12 jurisdiction=California
jurisdiction=Georgia party=Innotrac_Corporation
""
jurisdiction=New_York
""
jurisdiction=New_York party=General_Electric_Company
jurisdiction=Indiana
jurisdiction=Georgia
jurisdiction=New_Jersey
""
party=The_Cato_Corporation
jurisdiction=Georgia term=2_years
""
effective_date=2019-07-19 jurisdiction=Nevada party=Cosmos_Group_Holdings
jurisdiction=Missouri
effective_date=2007-06-14 jurisdiction=Utah
effective_date=2010-04-27 jurisdiction=Connecticut
jurisdiction=Delaware
effective_date=2015-11-24
effective_date=2017-02-10
jurisdiction=Georgia
jurisdiction=California
effective_date=2013-05-29 jurisdiction=New_York party=WMI_Holdings_Corp.
jurisdiction=Pennsylvania
jurisdiction=California party=SPECIALIZED_MARKETING_SERVICES
""
jurisdiction=California
jurisdiction=Nevada party=IPSA_International_Services
jurisdiction=Pennsylvania term=2_years
effective_date=2003-07-30 jurisdiction=New_York party=Dodger_Acquisition_Corp.
jurisdiction=Virginia party=Daniel_L._Betts\nBY
jurisdiction=Virginia
jurisdiction=Delaware
jurisdiction=Nevada
jurisdiction=Nevada
jurisdiction=Georgia
effective_date=2008-09-10 jurisdiction=California
""
""
1 jurisdiction=Ohio
2 jurisdiction=California
3 jurisdiction=Indiana
4 effective_date=2007-03-28 jurisdiction=New_York term=2_years
5 jurisdiction=Nevada
6 effective_date=2010-07-16 jurisdiction=Utah
7
8 jurisdiction=California
9 jurisdiction=Delaware
10 effective_date=2008-06-25 jurisdiction=New_York
11 jurisdiction=California
12 jurisdiction=Delaware term=3_years
13 jurisdiction=New_York party=Central_European_Distribution_Corporation
14 effective_date=2017-07-20 jurisdiction=Georgia
15 jurisdiction=Texas party=Open_Text_Corporation
16 effective_date=2008-04-16 jurisdiction=California
17 jurisdiction=Washington party=L._Schneider, party=Schneider
18
19 jurisdiction=Florida
20
21 jurisdiction=Florida
22 jurisdiction=New_York
23 jurisdiction=California
24 jurisdiction=Florida
25 jurisdiction=New_York
26 jurisdiction=Washington party=ELECTRONIC_ARTS
27 jurisdiction=Texas
28 jurisdiction=Delaware
29 jurisdiction=Georgia party=American_Tower_Corporation
30 jurisdiction=Washington
31 effective_date=2012-01-11 jurisdiction=Delaware
32
33 jurisdiction=California party=Rovi_Corporation party=Sonic_Solutions
34 jurisdiction=California
35
36 jurisdiction=California party=CVS_Caremark_Corporation
37 jurisdiction=Virginia
38 effective_date=2014-01-28 jurisdiction=Delaware
39 jurisdiction=Florida
40 jurisdiction=California
41 jurisdiction=Virginia
42 effective_date=2010-07-23 jurisdiction=Pennsylvania
43 effective_date=2010-01-25 jurisdiction=Delaware
44 jurisdiction=Washington
45 jurisdiction=Virginia
46 jurisdiction=California
47
48 effective_date=2000-03-28 jurisdiction=Pennsylvania
49 jurisdiction=New_Jersey
50 jurisdiction=Illinois
51
52 jurisdiction=Massachusetts
53 jurisdiction=Washington
54 jurisdiction=New_York
55
56 jurisdiction=Pennsylvania
57 jurisdiction=Pennsylvania
58 jurisdiction=California
59 effective_date=2001-09-17 jurisdiction=Georgia
60 jurisdiction=Delaware term=2_years
61 effective_date=2018-04-10 jurisdiction=Delaware
62 jurisdiction=Massachusetts
63 jurisdiction=Connecticut
64 effective_date=2006-05-11 jurisdiction=California
65 jurisdiction=Texas
66 jurisdiction=Delaware
67 jurisdiction=Virginia party=Peter_Federico
68 effective_date=2013-11-18
69 jurisdiction=Washington
70
71 party=The_Corporation
72 jurisdiction=Texas
73
74
75 effective_date=2017-05-24 jurisdiction=Nevada
76 jurisdiction=New_York
77 jurisdiction=Delaware party=Sprint_Corporation
78 jurisdiction=Illinois
79 effective_date=2014-12-22 jurisdiction=New_York
80 effective_date=2012-01-27 jurisdiction=New_York term=18_months
81 jurisdiction=Florida
82 jurisdiction=Virginia party=L._Waechter_CACI_International
83 jurisdiction=New_York
84 effective_date=2005-09-19 jurisdiction=Nevada party=MIKOHN_GAMING_CORPORATION
85 effective_date=2016-11-17 jurisdiction=Delaware
86 jurisdiction=New_Jersey
87
88 jurisdiction=Georgia party=EFCO_Corporation
89
90 jurisdiction=California party=Laboratory_Corporation_of_America_Holdings party=Laboratory_Corporation
91 jurisdiction=Missouri
92 jurisdiction=Florida
93 effective_date=2015-08-26 jurisdiction=Washington
94 jurisdiction=Ohio
95 effective_date=2004-03-17 jurisdiction=New_York
96 jurisdiction=Georgia
97 jurisdiction=New_York
98 jurisdiction=New_York
99
100 jurisdiction=California
101 party=Telco_Solutions
102 jurisdiction=Ohio
103
104 jurisdiction=California
105 jurisdiction=California
106 jurisdiction=Connecticut
107 effective_date=2019-02-14
108 effective_date=2016-11-17 jurisdiction=Delaware
109 effective_date=2019-01-16 jurisdiction=Utah
110 jurisdiction=California term=18_months
111 jurisdiction=Utah
112
113 jurisdiction=New_York
114 jurisdiction=New_York
115 effective_date=2002-02-28 jurisdiction=California party=SignalSoft_Corporation
116 effective_date=2013-07-29 jurisdiction=New_York
117 effective_date=2006-04-21 jurisdiction=Virginia
118 jurisdiction=Massachusetts
119 effective_date=2006-07-18 jurisdiction=Texas term=2_years
120 jurisdiction=Massachusetts
121 effective_date=2007-04-23
122 effective_date=2018-04-26 jurisdiction=New_York
123 party=Flagstar_Bancorp
124 jurisdiction=Pennsylvania
125 jurisdiction=New_York
126 jurisdiction=New_Jersey
127 effective_date=2011-05-27 jurisdiction=Texas
128
129 jurisdiction=Ohio
130 jurisdiction=Oregon
131 effective_date=2014-07-15 jurisdiction=New_Jersey party=Realogy_Group_LLC
132 effective_date=1999-04-29 jurisdiction=Florida
133 jurisdiction=Oregon
134 jurisdiction=Massachusetts
135 jurisdiction=Ohio
136 jurisdiction=California term=18_months
137
138 jurisdiction=Indiana
139 jurisdiction=California
140 effective_date=2012-05-21 jurisdiction=Virginia party=Donald_H._Layton\nDate:\nMay
141
142 effective_date=2009-02-16 jurisdiction=Delaware
143 party=2212421\n(Federal_ID#
144 jurisdiction=Pennsylvania party=Ikonics_Corporation
145 jurisdiction=Ohio
146 effective_date=1994-07-11 jurisdiction=California
147 jurisdiction=New_Jersey
148
149
150 jurisdiction=Virginia party=The_Corporation
151
152
153 jurisdiction=Delaware party=Chugai_Pharmaceutical_Co.
154 effective_date=2006-02-28 jurisdiction=New_York
155 jurisdiction=California
156
157 effective_date=2009-01-15 jurisdiction=Texas party=1st
158 effective_date=2007-11-30 jurisdiction=Georgia
159 effective_date=1998-09-22 jurisdiction=New_York
160 effective_date=2012-01-27 jurisdiction=New_York term=18_months
161 jurisdiction=Oregon
162 jurisdiction=Nevada
163 jurisdiction=California
164
165 effective_date=2008-03-12 jurisdiction=California
166 jurisdiction=Georgia party=Innotrac_Corporation
167
168 jurisdiction=New_York
169
170 jurisdiction=New_York party=General_Electric_Company
171 jurisdiction=Indiana
172 jurisdiction=Georgia
173 jurisdiction=New_Jersey
174
175 party=The_Cato_Corporation
176 jurisdiction=Georgia term=2_years
177
178 effective_date=2019-07-19 jurisdiction=Nevada party=Cosmos_Group_Holdings
179 jurisdiction=Missouri
180 effective_date=2007-06-14 jurisdiction=Utah
181 effective_date=2010-04-27 jurisdiction=Connecticut
182 jurisdiction=Delaware
183 effective_date=2015-11-24
184 effective_date=2017-02-10
185 jurisdiction=Georgia
186 jurisdiction=California
187 effective_date=2013-05-29 jurisdiction=New_York party=WMI_Holdings_Corp.
188 jurisdiction=Pennsylvania
189 jurisdiction=California party=SPECIALIZED_MARKETING_SERVICES
190
191 jurisdiction=California
192 jurisdiction=Nevada party=IPSA_International_Services
193 jurisdiction=Pennsylvania term=2_years
194 effective_date=2003-07-30 jurisdiction=New_York party=Dodger_Acquisition_Corp.
195 jurisdiction=Virginia party=Daniel_L._Betts\nBY
196 jurisdiction=Virginia
197 jurisdiction=Delaware
198 jurisdiction=Nevada
199 jurisdiction=Nevada
200 jurisdiction=Georgia
201 effective_date=2008-09-10 jurisdiction=California
202
203

254
train/out.tsv Normal file

File diff suppressed because one or more lines are too long