contextualizer module

contextualizer.contextualize(word='none', option='fast', dbname='1527000328.745918')[source]

Gettting a context with a speified method and saving in DB

Parameters:
  • word (str) – The word meant for contextualization
  • option (str) – Type of contextualization we aim for
  • dbname (str) – The dbname that we save in
Returns:

The strucutred dictionary for word and contexts

Return type:

context_dict (dict)

contextualizer.list_contextualize(proc_list=[], option='fast', iterator=0, dbname='1527000328.745926')[source]

Gettting a context with a speified method for the given word list

Parameters:
  • proc_list (list) – The word list meant for contextualization
  • option (str) – Type of contextualization we aim for
  • iterator (int) – Processing Thread number
  • dbname (str) – The dbname that we save in
Returns:

(void)

contextualizer.parallel_runner(process_number, proc_list, option, dbname)[source]

Initialize DB for words. Running Parallel threads for contextualization.

Parameters:
  • proc_list (list) – The word list meant for contextualization
  • option (str) – Type of contextualization we aim for
  • process_number (int) – Processing Thread number
  • dbname (str) – The dbname that we save in
Returns:

(void)