Skip to content

Commit

Permalink
changes nel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cwulfman committed Sep 20, 2022
1 parent 2b717b6 commit 847fba2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions nel/nel/nel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'''Create named entities from data file'''
"""Create named entities from data file"""
import os
import csv

Expand All @@ -9,16 +9,15 @@

appellations = {}

with open(path, 'r') as data_file:
with open(path, "r") as data_file:
reader = csv.DictReader(data_file)
for row in reader:
appellation = row['appellation']
appellation = row["appellation"]
if appellation not in appellations.keys():
appellations[appellation] = {}
appellations[appellation]['viaf_id'] = row['VIAF_ID']
appellations[appellation]['inscriptions'] = []
appellations[appellation]['inscriptions'].append(row['inscription'])

appellations[appellation]["viaf_id"] = row["VIAF_ID"]
appellations[appellation]["inscriptions"] = []
appellations[appellation]["inscriptions"].append(row["inscription"])


# with open(data_file, 'r') as f:
Expand Down

0 comments on commit 847fba2

Please sign in to comment.