Skip to content

Database Tables

models

This module defines the kotobase database schema with SQLAlchemy

JMDictEntry

Bases: Base

Raw Database JMDictEntry Table

Attributes:

Name Type Description
id int

Row ID

rank id

Priority rank

kanji relationship

Relationship to JMDict Kanji Table

kana relationship

Relationship to JMDict Kana Table

senses relationship

Relationship to JMDict Senses Table

JMDictGlossFTS

Bases: Base

FTS5 shadow table for entry sense gloss.

Attributes:

Name Type Description
rowid int

Row ID

gloss str

Entry sense gloss.

JMDictKana

Bases: Base

Raw Database JMDictEntry Kana Table.

Attributes:

Name Type Description
id int

Row ID

entry_id int

Foreign key to JMDictEntry id

order int

Order of appearence

text str

Kana Text

entry relationship

Relationship to JMDict Entries

JMDictKanji

Bases: Base

Raw Database JMDict Kanji Table

Attributes:

Name Type Description
id int

Row ID

entry_id int

Foreign key to JMDictEntry id

order int

Order of appearence

text str

Kanji Text

entry relationship

Relationship to JMDict Entries

JMDictSense

Bases: Base

Raw Database JMDict Senses Table.

Attributes:

Name Type Description
id int

Row ID

entry_id int

Foreign Key to JMDict Entries Table ID

order int

Integer representing precedence of sense.

pos str

Part of Speech the entry sense belongs to.

gloss str

Gloss of the entry.

entry relationship

Relationship to JMDict Entries Table

JMnedictEntry

Bases: Base

Raw Database JMNeDictEntry Table.

Attributes:

Name Type Description
id int

Row ID

kanji str

Kanji text

kana str

Kana text

translation_type str

Type of entry.

translation Text

English text

JlptGrammar

Bases: Base

Raw Database Tanos JLPT Grammar Table.

Attributes:

Name Type Description
id int

Row ID

level int

JLPT level of grammar point

grammar str

Grammar point itself

formation str

General formation of grammar point

examples Text

List of examples containing grammar point

JlptKanji

Bases: Base

Raw Database Tanos JLPT Kanji Table.

Attributes:

Name Type Description
id int

Row ID

level int

Tanos JLPT level of Kanji

kanji str

Literal Kanji

on_yomi str

On'yomi of the Kanji

kun_yomi str

Kun'yomi of the Kanji

english str

English translation

JlptVocab

Bases: Base

Raw Database Tanos JLPT Vocab List Table.

Attributes:

Name Type Description
id int

Row ID

level int

JLPT Level of the entry

kanji str

Kanji contained in the entry

hiragana str

Kana Reading of the entry

english Text

English translation of the entry

Kanjidic

Bases: Base

Raw Database KANJIDIC2 Table.

Attributes:

Name Type Description
literal str

Kanji Literal

grade int

Japanese Grade in which Kanji is taught.

stroke_count int

Number of strokes in handwriting.

jlpt int

KANJIDIC2 JLPT classification.

on_readings str

On'yomi of Kanji

kun_readings str

Kun'yomi of Kanji

meanings str

List of meanings.

TatoebaSentence

Bases: Base

Raw Database Tatoeba Example Sentences Table.

Attributes:

Name Type Description
id int

Row ID

text Text

The example sentence entry.

This module defines the kotobase database schema with SQLAlchemy

Base = declarative_base() module-attribute