WolfgangFahl / ProceedingsTitleParser

Shallow Semantic Parser to extract metadata from scientific proceedings titles
Apache License 2.0
3 stars 1 forks source link

support generalization when generating PlantUMl #47

Closed WolfgangFahl closed 3 years ago

WolfgangFahl commented 3 years ago

automatically extract generalized table information if asked for e.g.:

 def testPlantUml(self):
        '''
        get plant UML functionality 
        '''
        lookup=Lookup("plantuml",getAll=False,butNot='or')
        dbfile=lookup.getDBFile('Event_all')
        sqlDb=SQLDB(dbfile)
        tableList=sqlDb.getTableList()
        for table in tableList:
            if not table['name'].startswith("Event_"):
                tableList.remove(table)
        plantUml=SQLDB.tableListToPlantUml(tableList, 'DataDonations',generalizeTo="Event")
        print (plantUml)

should extract:

 entity Event {
    acronym : TEXT 
    source : TEXT 
    title : TEXT 
    year : INTEGER 
    eventId : TEXT <<PK>>
    url : TEXT 
    lookupAcronym : TEXT 
  }
...
  Event <|-- Event_or
  Event <|-- Event_CEURWS
  Event <|-- Event_crossref
  Event <|-- Event_confref
  Event <|-- Event_wikicfp
  Event <|-- Event_wikidata
  Event <|-- Event_dblp

and remove the generalized/common attributes from the UML diagram