From 9fe2b6c8bf631a265dec44b5f474b97ad9d277c2 Mon Sep 17 00:00:00 2001 From: gilad_ilsar Date: Thu, 22 Sep 2016 14:28:05 +0300 Subject: updates --- factories/INL_factory.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'factories/INL_factory.py') 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() -- cgit v1.2.3