summaryrefslogtreecommitdiff
path: root/factories/INL_factory.py
diff options
context:
space:
mode:
Diffstat (limited to 'factories/INL_factory.py')
-rw-r--r--factories/INL_factory.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/factories/INL_factory.py b/factories/INL_factory.py
index e52257f..e9838f4 100644
--- a/factories/INL_factory.py
+++ b/factories/INL_factory.py
@@ -21,7 +21,8 @@ ENTITY_KEYS = {
'451:a': 'name_in_langs',
'451:9': 'langs_langindic',
'550.a': 'type_of_place',
- '667.a': 'comment'
+ '667.a': 'comment',
+ '374.a': 'profession'
}
@@ -50,6 +51,7 @@ class INLFactory(BasicFactory):
comment_list = list()
eng_name = ''
date_of_birth = ''
+ profession = list()
#get the names and date of birth and bio data
for field in raw_object.getroot():
key = field.attrib.get('tag')
@@ -79,7 +81,9 @@ class INLFactory(BasicFactory):
bio_data.append(field.text)
elif tag == 'comment':
comment_list.append(field.text)
- return entities.Person(eng_name, date_of_birth, name_in_langs, bio_data, comment_list)
+ elif tag == 'profession':
+ profession.append(field.text)
+ return entities.Person(eng_name, date_of_birth, name_in_langs, bio_data, comment_list, profession)
#110 is institue
elif record_key == '110':
return entities.Institution()