Utils¶
Module for miscellaneous functions.
-
class
yalign.utils.CacheOfSizeOne(f)¶ Bases:
objectFunction wrapper that provides caching.
-
f= None¶
-
-
class
yalign.utils.Memoized¶ Bases:
collections.defaultdict
-
yalign.utils.host_and_page(url)¶ Splits a url into the hostname and the rest of the url.
-
yalign.utils.read_from_url(url)¶ GET this url and read the response.
-
yalign.utils.write_tmx(stream, sentence_pairs, language_a, language_b)¶ Writes the SentencePair’s out in tmx format,