ehn.db.data module

Please refer the tutorial “Database”.

class ehn.db.data.EhnDbNodeType(value)[source]

Bases: enum.Enum

E-HowNet Database Node Type.

C = 'C'

concept.

W = 'W'

word.

class ehn.db.data.EhnDbWordData(word: str, sense_no: int)[source]

Bases: object

E-HowNet Database Word Data.

word: str

the word.

sense_no: int

the sense number.

class ehn.db.data.EhnDbNodeData(type: ehn.db.data.EhnDbNodeType, defn: Optional[str] = None, words: List[ehn.db.data.EhnDbWordData] = <factory>, definite: bool = False)[source]

Bases: object

E-HowNet Database Node Data.

type: ehn.db.data.EhnDbNodeType

the node type.

defn: str = None

the definition.

words: List[ehn.db.data.EhnDbWordData]

the attached words.

definite: bool = False

whether is an instance of not.

class ehn.db.data.EhnDbNode(tag=None, identifier=None, expanded=True, data=None)[source]

Bases: treelib.node.Node

E-HowNet Database Node.

data_class

alias of ehn.db.data.EhnDbNodeData