From 1ef61ecf9be1f6fbf94792adfa2e43042d160ead Mon Sep 17 00:00:00 2001 From: theta00 <72700814+theta00@users.noreply.github.com> Date: Tue, 3 May 2022 14:56:00 +0200 Subject: [PATCH] Find jurisdiction --- run.py | 19 ++++ train/out.tsv | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 273 insertions(+) create mode 100644 train/out.tsv diff --git a/run.py b/run.py index 7fed888..47af70e 100644 --- a/run.py +++ b/run.py @@ -51,3 +51,22 @@ with open('test-A/out.tsv', 'w') as file: else: file.write('\n') + +# In[45]: + + +with open('train/in.tsv', 'r', encoding='utf8') as file: + lines = file.readlines() + + +# In[46]: + + +with open('train/out.tsv', 'w') as file: + for line in lines: + jur = regex.search(line) + if jur: + file.write('jurisdiction=' + jur.group().replace(' ', '_') +'\n') + else: + file.write('\n') + diff --git a/train/out.tsv b/train/out.tsv new file mode 100644 index 0000000..8ac4127 --- /dev/null +++ b/train/out.tsv @@ -0,0 +1,254 @@ +jurisdiction=Oregon +jurisdiction=Delaware +jurisdiction=Florida +jurisdiction=Pennsylvania +jurisdiction=California +jurisdiction=California +jurisdiction=Virgin_Islands +jurisdiction=Delaware +jurisdiction=Illinois +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Iowa +jurisdiction=Delaware +jurisdiction=Indiana +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Colorado +jurisdiction=Georgia +jurisdiction=New_York +jurisdiction=Oregon +jurisdiction=Pennsylvania +jurisdiction=Delaware +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=Illinois +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=California +jurisdiction=California +jurisdiction=Missouri +jurisdiction=Oregon +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Connecticut +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=Illinois +jurisdiction=Idaho +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Minnesota +jurisdiction=Virginia +jurisdiction=California +jurisdiction=Nevada +jurisdiction=Nevada +jurisdiction=New_York +jurisdiction=Washington +jurisdiction=Pennsylvania +jurisdiction=Ohio +jurisdiction=Nevada +jurisdiction=Georgia +jurisdiction=Massachusetts +jurisdiction=Texas +jurisdiction=New_York +jurisdiction=New_York +jurisdiction=Virginia +jurisdiction=Wisconsin +jurisdiction=Nevada +jurisdiction=Oregon +jurisdiction=Pennsylvania +jurisdiction=Ohio +jurisdiction=Delaware +jurisdiction=South_Dakota +jurisdiction=New_York +jurisdiction=Indiana +jurisdiction=Pennsylvania +jurisdiction=Minnesota +jurisdiction=Kansas +jurisdiction=Florida +jurisdiction=Illinois +jurisdiction=Indiana +jurisdiction=Delaware +jurisdiction=Illinois +jurisdiction=California +jurisdiction=California +jurisdiction=California +jurisdiction=Maine +jurisdiction=North_Carolina +jurisdiction=Delaware +jurisdiction=Georgia +jurisdiction=Missouri +jurisdiction=New_York +jurisdiction=Georgia +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Oregon +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=Connecticut +jurisdiction=Utah +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Ohio +jurisdiction=California +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=South_Carolina +jurisdiction=Texas +jurisdiction=New_York +jurisdiction=Nevada +jurisdiction=Georgia +jurisdiction=Massachusetts +jurisdiction=Texas +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=New_Jersey +jurisdiction=Pennsylvania +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Nevada +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Oregon +jurisdiction=North_Carolina +jurisdiction=Pennsylvania +jurisdiction=Maryland +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=Massachusetts +jurisdiction=District_ +jurisdiction=New_York +jurisdiction=Missouri +jurisdiction=Virginia +jurisdiction=California +jurisdiction=Delaware +jurisdiction=California + +jurisdiction=Wisconsin +jurisdiction=Washington +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Puerto_Rico +jurisdiction=Delaware +jurisdiction=Massachusetts +jurisdiction=Delaware +jurisdiction=Ohio +jurisdiction=Illinois +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Massachusetts +jurisdiction=Delaware +jurisdiction=Utah +jurisdiction=Washington +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=California +jurisdiction=Colorado +jurisdiction=Kansas +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Washington +jurisdiction=Kentucky +jurisdiction=Michigan +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Delaware + +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=California +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Texas +jurisdiction=New_York +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Missouri +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=Oregon + +jurisdiction=New_York +jurisdiction=New_York +jurisdiction=Texas +jurisdiction=District_ +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=Alabama +jurisdiction=Delaware +jurisdiction=Indiana +jurisdiction=Oregon +jurisdiction=Minnesota + +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=California +jurisdiction=New_York +jurisdiction=Delaware +jurisdiction=Colorado +jurisdiction=Pennsylvania +jurisdiction=New_York +jurisdiction=Indiana +jurisdiction=California +jurisdiction=Pennsylvania +jurisdiction=Massachusetts +jurisdiction=Delaware +jurisdiction=Virginia +jurisdiction=Ohio +jurisdiction=Illinois +jurisdiction=California +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Oregon +jurisdiction=Texas +jurisdiction=Texas +jurisdiction=Michigan +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=Ohio +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Georgia +jurisdiction=New_York +jurisdiction=Massachusetts +jurisdiction=Texas +jurisdiction=New_York +jurisdiction=Pennsylvania +jurisdiction=Michigan +jurisdiction=Washington +jurisdiction=Ohio +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=California +jurisdiction=California +jurisdiction=Delaware +jurisdiction=Delaware +jurisdiction=Ohio +jurisdiction=Delaware +jurisdiction=New_York +jurisdiction=California +jurisdiction=Pennsylvania +jurisdiction=New_York +jurisdiction=District_ +jurisdiction=Delaware +jurisdiction=Florida +jurisdiction=Delaware +jurisdiction=District_ +jurisdiction=California +jurisdiction=Delaware