@startuml

set namespaceseparator none
skinparam dpi 96
skinparam ArrowColor Black
skinparam shadowing true
skinparam class {
  backgroundColor Business
  borderColor Red
}
skinparam object {
  backgroundColor lavender
  borderColor black
}
'skinparam linetype ortho
'skinparam groupInheritance 4

package depccg #DDDDDD {}
package transformers #DDDDDD {}

abstract class Reader {
  sentence2diagram()
  sentences2diagrams()
}

abstract class CCGParser {
  sentence2tree()
  sentences2trees()
}

class TreeReader {
  ccg_parser : CCGParser
  mode: TreeReaderMode
  word_type
}

enum TreeReaderMode {
    NO_TYPE
    RULE_ONLY
    RULE_TYPE
}

class LinearReader {
    combining_diagram
    start_box
    word_type
}
class SpidersReader {}
class DepCCGParser
class WebParser
class BobcatParser {
    parser
    tagger
}
class CCGBankParser
enum CCGRule {
    UNKNOWN
    LEXICAL
    UNARY
    FORWARD_APPLICATION
    BACKWARD_APPLICATION
    FORWARD_COMPOSITION
    BACKWARD_COMPOSITION
    FORWARD_CROSSED_COMPOSITION
    BACKWARD_CROSSED_COMPOSITION
    GENERALIZED_FORWARD_COMPOSITION
    GENERALIZED_BACKWARD_COMPOSITION
    GENERALIZED_FORWARD_CROSSED_COMPOSITION
    GENERALIZED_BACKWARD_CROSSED_COMPOSITION
    REMOVE_PUNCTUATION_LEFT
    REMOVE_PUNCTUATION_RIGHT
    FORWARD_TYPE_RAISING
    BACKWARD_TYPE_RAISING
    CONJUNCTION
    symbol()
}
class CCGTree

class bobcat.Tagger #back:wheat;line:tomato
class bobcat.ChartParser #back:wheat;line:tomato

object cups_reader
object spiders_reader
object stairs_reader

Reader <|-- CCGParser
Reader <|-- TreeReader
Reader <|-- LinearReader
Reader <|-- SpidersReader

LinearReader <.u. cups_reader : <<instanceOf>>
LinearReader <.u. stairs_reader : <<instanceOf>>

CCGParser <|- DepCCGParser
CCGParser <|-- BobcatParser
CCGParser <|-- WebParser
CCGParser <|--- CCGBankParser

SpidersReader <.. spiders_reader : <<instanceOf>>

DepCCGParser - depccg: > uses

TreeReader::ccg_parser o-- CCGParser
TreeReader::mode *-l- TreeReaderMode
LinearReader::word_type *-- backend.grammar.Ty
TreeReader::word_type *-- backend.grammar.Ty
LinearReader::combining_diagram *-- backend.grammar.Diagram
LinearReader::start_box *-- backend.grammar.Diagram

BobcatParser::parser *-- bobcat.ChartParser
BobcatParser::tagger *-- bobcat.Tagger

bobcat.ChartParser -- transformers : uses >
bobcat.Tagger -- transformers: uses >
WebParser -- depccg: uses >

CCGTree *-- CCGRule
CCGTree -u- CCGParser : < generates
backend.grammar.Diagram -- CCGTree : < isConvertedTo

Reader -- backend.grammar.Diagram : generates >

@enduml
