translate.services.tmserver.TMServer

Package translate :: Package services :: Module tmserver :: Class TMServer |
[hide private]
[frames] | no frames]

# Class TMServer

source code

A RESTful JSON TM server.

Instance Methods | [hide private]
__init__(self, tmdbfile, tmfiles, max_candidates=3, min_similarity=75, max_length=1000, prefix=`'````'`, source_lang=None, target_lang=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
_load_files(self, tmfiles, source_lang, target_lang) | source code
translate_unit(self, environ, start_response) | source code
add_unit(self, environ, start_response) | source code
update_unit(self, environ, start_response) | source code
forget_unit(self, environ, start_response) | source code
get_store_stats(self, environ, start_response) | source code
upload_store(self, environ, start_response) add units from uploaded file to tmdb | source code
add_store(self, environ, start_response) Add unit from POST data to tmdb. | source code
forget_store(self, environ, start_response) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, tmdbfile, tmfiles, max_candidates=3, min_similarity=75, max_length=1000, prefix=`'````'`, source_lang=None, target_lang=None) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### translate_unit(self, environ, start_response) | source code
Decorators: `@selector.opliant`

### add_unit(self, environ, start_response) | source code
Decorators: `@selector.opliant`

### update_unit(self, environ, start_response) | source code
Decorators: `@selector.opliant`

### forget_unit(self, environ, start_response) | source code
Decorators: `@selector.opliant`

### get_store_stats(self, environ, start_response) | source code
Decorators: `@selector.opliant`

### upload_store(self, environ, start_response) | source code
add units from uploaded file to tmdb Decorators: `@selector.opliant`

### add_store(self, environ, start_response) | source code
Add unit from POST data to tmdb. Decorators: `@selector.opliant`

### forget_store(self, environ, start_response) | source code
Decorators: `@selector.opliant`