def __init__(self, sModelName, sModelDir): recordClass.__init__(self, deathRecord.sName) myTagger = ABPTagger() myTagger.loadResources(sModelName, sModelDir) #bride bfnField = firstNameField() bfnField.setLabelMapping(['firstNameGenerator']) bfnField.addTagger(myTagger) bfnField.setMandatory() self.addField(bfnField) gnfield = lastNameField() gnfield.addTagger(myTagger) gnfield.setLabelMapping(['lastNameGenerator']) gnfield.setMandatory() self.addField(gnfield) #groom gfnField = firstNameField() gfnField.setLabelMapping(['firstNameGenerator']) gfnField.addTagger(myTagger) gfnField.setMandatory() self.addField(gfnField) gnfield = lastNameField() gnfield.addTagger(myTagger) gnfield.setLabelMapping(['lastNameGenerator']) gnfield.setMandatory() self.addField(gnfield) lfield = locationField() lfield.addTagger(myTagger) lfield.setLabelMapping(['locationGenerator']) self.addField(lfield) wDate = weddingDate() wDate.addTagger(myTagger) # dDate.setLabelMapping(['weekDayDateGenerator','MonthDayDateGenerator','MonthDateGenerator']) xDate.setLabelMapping(['MonthDateGenerator']) self.addField(dDate)
def __init__(self,sModelName,sModelDir): recordClass.__init__(self,deathRecord.sName) myTagger = ABPTagger() myTagger.loadResources(sModelName ,sModelDir ) self.tagger=myTagger #bride bfnField = firstNameField() bfnField.setLabelMapping( ['firstNameGenerator']) bfnField.addTagger(myTagger) bfnField.setMandatory() self.addField(bfnField) gnfield = lastNameField() gnfield.addTagger(myTagger) gnfield.setLabelMapping(['lastNameGenerator']) gnfield.setMandatory() self.addField(gnfield) # need a specific class for bride and groom and witnesses... blfield= locationField() blfield.addTagger(myTagger) blfield.setLabelMapping(['locationGenerator']) self.addField(blfield) wDate= weddingDate() wDate.addTagger(myTagger) wDate.setLabelMapping(['yearGenerator']) self.addField(wDate) wmDate= weddingDateMonth() wmDate.addTagger(myTagger) wmDate.setLabelMapping(['MonthDateGenerator']) self.addField(wmDate) wdDate= weddingDateDay() wdDate.addTagger(myTagger) wdDate.setLabelMapping(['MonthDayDateGenerator']) self.addField(wdDate) bDate= brideDate() bDate.addTagger(myTagger) bDate.setLabelMapping(['yearGenerator']) self.addField(bDate) bmDate= brideDateMonth() bmDate.addTagger(myTagger) bmDate.setLabelMapping(['MonthDateGenerator']) self.addField(bmDate) bdDate= brideDateDay() bdDate.addTagger(myTagger) bdDate.setLabelMapping(['MonthDayDateGenerator']) self.addField(bdDate) bfield= occupationField() bfield.addTagger(myTagger) bfield.setLabelMapping(['professionGenerator']) self.addField(bfield) #groom gfnField = firstNameField() gfnField.setLabelMapping( ['firstNameGenerator']) gfnField.addTagger(myTagger) gfnField.setMandatory() self.addField(gfnField) gnfield = lastNameField() gnfield.addTagger(myTagger) gnfield.setLabelMapping(['lastNameGenerator']) gnfield.setMandatory() self.addField(gnfield) lfield= locationField() lfield.addTagger(myTagger) lfield.setLabelMapping(['locationGenerator']) self.addField(lfield) gDate= groomDate() gDate.addTagger(myTagger) gDate.setLabelMapping(['yearGenerator']) self.addField(gDate) gmDate= groomDateMonth() gmDate.addTagger(myTagger) gmDate.setLabelMapping(['MonthDateGenerator']) self.addField(gmDate) gdDate= groomDateDay() gdDate.addTagger(myTagger) gdDate.setLabelMapping(['MonthDayDateGenerator']) self.addField(gdDate) gfield= occupationField() gfield.addTagger(myTagger) gfield.setLabelMapping(['professionGenerator']) self.addField(gfield) #parent bride bpfnField = firstNameField() bpfnField.setLabelMapping( ['firstNameGenerator']) bpfnField.addTagger(myTagger) self.addField(bpfnField) bpnfield = lastNameField() bpnfield.addTagger(myTagger) bpnfield.setLabelMapping(['lastNameGenerator']) self.addField(bpnfield) bpofield= occupationField() bpofield.addTagger(myTagger) bpofield.setLabelMapping(['professionGenerator']) self.addField(bpofield) bmfnField = firstNameField() bmfnField.setLabelMapping( ['firstNameGenerator']) bmfnField.addTagger(myTagger) self.addField(bmfnField) bmnfield = lastNameField() bmnfield.addTagger(myTagger) bmnfield.setLabelMapping(['lastNameGenerator']) self.addField(bmnfield) bmofield= occupationField() bmofield.addTagger(myTagger) bmofield.setLabelMapping(['professionGenerator']) self.addField(bmofield) # parent groom gpfnField = firstNameField() gpfnField.setLabelMapping( ['firstNameGenerator']) gpfnField.addTagger(myTagger) self.addField(gpfnField) gpnfield = lastNameField() gpnfield.addTagger(myTagger) gpnfield.setLabelMapping(['lastNameGenerator']) self.addField(gpnfield) gpofield= occupationField() gpofield.addTagger(myTagger) gpofield.setLabelMapping(['professionGenerator']) self.addField(gpofield) gmfnField = firstNameField() gmfnField.setLabelMapping( ['firstNameGenerator']) gmfnField.addTagger(myTagger) self.addField(gmfnField) gmnfield = lastNameField() gmnfield.addTagger(myTagger) gmnfield.setLabelMapping(['lastNameGenerator']) self.addField(gmnfield) gmofield= occupationField() gmofield.addTagger(myTagger) gmofield.setLabelMapping(['professionGenerator']) self.addField(gmofield) # witnesses wpfnField = firstNameField() wpfnField.setLabelMapping( ['firstNameGenerator']) wpfnField.addTagger(myTagger) self.addField(wpfnField) wpnfield = lastNameField() wpnfield.addTagger(myTagger) wpnfield.setLabelMapping(['lastNameGenerator']) self.addField(wpnfield) wpofield= occupationField() wpofield.addTagger(myTagger) wpofield.setLabelMapping(['professionGenerator']) self.addField(wpofield) wfield= locationField() wfield.addTagger(myTagger) wfield.setLabelMapping(['locationGenerator']) self.addField(wfield) wmfnField = firstNameField() wmfnField.setLabelMapping( ['firstNameGenerator']) wmfnField.addTagger(myTagger) self.addField(wmfnField) wmnfield = lastNameField() wmnfield.addTagger(myTagger) wmnfield.setLabelMapping(['lastNameGenerator']) self.addField(wmnfield) wfield= locationField() wfield.addTagger(myTagger) wfield.setLabelMapping(['locationGenerator']) self.addField(wfield) wmofield= occupationField() wmofield.addTagger(myTagger) wmofield.setLabelMapping(['professionGenerator']) self.addField(wmofield)
def __init__(self,sModelName,sModelDir): recordClass.__init__(self,deathRecord.sName) myTagger = ABPTagger() myTagger.loadResources(sModelName ,sModelDir ) self.tagger=myTagger fnField = firstNameField() fnField.setLabelMapping( ['firstNameGenerator']) fnField.addTagger(myTagger) fnField.setMandatory() self.addField(fnField) nfield = lastNameField() nfield.addTagger(myTagger) nfield.setLabelMapping(['lastNameGenerator']) nfield.setMandatory() self.addField(nfield) rfield=religionField() rfield.addTagger(myTagger) rfield.setLabelMapping(['religionGenerator']) self.addField(rfield) lfield= locationField() lfield.addTagger(myTagger) lfield.setLabelMapping(['location2Generator']) self.addField(lfield) ofield= occupationField() ofield.addTagger(myTagger) ofield.setLabelMapping(['professionGenerator']) self.addField(ofield) # sfield= situationField() sfield.addTagger(myTagger) sfield.setLabelMapping(['familyStatus']) self.addField(sfield) # # specific tagger for dates ? dDate= deathDate() dDate.addTagger(myTagger) # dDate.setLabelMapping(['weekDayDateGenerator','MonthDayDateGenerator','MonthDateGenerator']) dDate.setLabelMapping(['MonthDateGenerator']) self.addField(dDate) ddDate= deathDateDay() ddDate.addTagger(myTagger) # dDate.setLabelMapping(['weekDayDateGenerator','MonthDayDateGenerator','MonthDateGenerator']) ddDate.setLabelMapping(['MonthDayDateGenerator']) self.addField(ddDate) bDate= burialDate() bDate.addTagger(myTagger) # bDate.setLabelMapping(['weekDayDateGenerator','MonthDayDateGenerator','MonthDateGenerator']) bDate.setLabelMapping(['MonthDateGenerator']) self.addField(bDate) year=deathYear() year.addTagger(myTagger) year.setLabelMapping(['yearGenerator']) self.addField(year) agefield=age() agefield.addTagger(myTagger) agefield.setLabelMapping(['ageValueGenerator']) self.addField(agefield) ageUnitfield=ageUnit() ageUnitfield.addTagger(myTagger) ageUnitfield.setLabelMapping(['AgeUnitGenerator']) self.addField(ageUnitfield) blfield= burialLocation() blfield.addTagger(myTagger) blfield.setLabelMapping(['location2Generator']) self.addField(blfield) reasonField = deathreasonField() reasonField.addTagger(myTagger) reasonField.setLabelMapping(['deathreasonGenerator']) self.addField(reasonField) drField = doktorField() drField.addTagger(myTagger) drField.setLabelMapping(['lastNameGenerator']) #lastNameGenerator self.addField(drField) drField = PriestField() drField.addTagger(myTagger) drField.setLabelMapping(['lastNameGenerator']) drField.setMandatory() self.addField(drField)