jamchu1 / KGLab_WS2022

0 stars 0 forks source link

create Project structure #6

Open DenizTanriverdi opened 1 year ago

DenizTanriverdi commented 1 year ago
classDiagram

class Series 
<<dataclass>> Series 
class Series {
    acronym
    title
    homepage
    eventList
}
class Event 
<<dataclass>> Event
class Event {
    eventTitle
    location
    country
    startDate
    endDate
    year
    language
    homepage
}
class PastEvent 
<<dataclass>> PastEvent 
class PastEvent {
    wikidataId
}
class PredEvent 
<<dataclass>> PredEvent 
class PredEvent {
    sourceURL
    series
    likelihood

}
class DBUtils {
    +extract_events(dbfile: str, cachefile: str)
}
class BS4Utils {

}
class EventPredictor {
    +predict(Series): PredEvent
}
class Event 
<<dataclass>> Event
class Event {
    homepage
}
class Table
<<dataclass>> Table
class Table {
    eventseriesList
}

PastEvent --|> Event
PredEvent --|> Event
Series "1" o-- "n" PastEvent
Series .. PredEvent 
Table "1" o-- "n"  Series
EventPredictor ..> URLPredictor
EventPredictor ..> NLPPredictor
EventPredictor .. PredEvent 
EventPredictor .. Series 
DBUtils .. Table
BS4Utils .. NLPPredictor
WolfgangFahl commented 1 year ago

Nice abstraction - what are the concretions/examples?

MaximilianJRichter commented 1 year ago

DBUtils provides static methods to work with the databases. In particular extract_events translates the db file into the Dataclasses.

The Table class is only used as a container for a list of all event series. In each Series we have a list of all corresponding events. These events have type PastEvent.

We then feed a series to the EventPredictor, which forwards it to the URLPredictor and/or the NLPPredictor. Based on the result from each of these a prediction is generated (PredEvent)