Package translate :: Package storage :: Module tmdb :: Class TMDB

[hide private]
[frames] | no frames]

# Class TMDB

source code

Instance Methods | [hide private]

__init__(self, db_file, max_candidates=3, min_similarity=75, max_length=1000) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

_get_connection(self, index) | source code

init_database(self) creates database tables and indices | source code

init_fulltext(self) detects if fts3 fulltext indexing module exists, initializes fulltext table if it does | source code

preload_db(self) ugly hack to force caching of sqlite db file in memory for improved performance | source code

add_unit(self, unit, source_lang=None, target_lang=None, commit=True) inserts unit in the database | source code

add_dict(self, unit, source_lang, target_lang, commit=True) inserts units represented as dictionaries in database | source code

add_store(self, store, source_lang, target_lang, commit=True) insert all units in store in database | source code

add_list(self, units, source_lang, target_lang, commit=True) insert all units in list into the database, units are represented as dictionaries | source code

translate_unit(self, unit_source, source_langs, target_langs) return TM suggestions for unit_source | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]

| _tm_dbs = ``{``}``

Properties | [hide private]

| connection
| cursor
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, db_file, max_candidates=3, min_similarity=75, max_length=1000)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

Property Details | [hide private]

### connection

Get Method:
  unreachable(self)

### cursor

Get Method:
  unreachable(self)