UCCA-App API Documentation

uccaapp.api Module

Classes

ServerAccessor(server_address, email, password)

Class Inheritance Diagram

Inheritance diagram of uccaapp.api.ServerAccessor

uccaapp.convert_and_evaluate Module

Functions

evaluate(guessed, ref[, converter, verbose, …]) Compare two passages and return requested diagnostics and scores, possibly printing them too.
glob(pathname, *[, recursive]) Return a list of paths matching a pathname pattern.
main(filenames, write, **kwargs)
read_files_and_dirs(files_and_dirs[, …])
param files_and_dirs:
 iterable of files and/or directories to look in

uccaapp.copy_categories Module

Functions

add_arguments(argparser)
main(args)

uccaapp.create_annotation_tasks Module

Functions

main(**kwargs)

Classes

AnnotationTaskCreator([project_id])
ServerAccessor(server_address, email, password)
tqdm([iterable, desc, total, leave, file, …]) Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested.

Class Inheritance Diagram

Inheritance diagram of uccaapp.create_annotation_tasks.AnnotationTaskCreator

uccaapp.create_tokenization_tasks Module

Functions

main(**kwargs)

Classes

AnnotationTaskCreator([project_id])
ServerAccessor(server_address, email, password)
TokenizationTaskCreator(project_id, **kwargs)

Class Inheritance Diagram

Inheritance diagram of uccaapp.create_tokenization_tasks.TokenizationTaskCreator

uccaapp.download_task Module

Functions

from_json(lines, *args[, …]) Convert text (or dict) in UCCA-App JSON format to a Passage object.
main(**kwargs)
write_passage(passage[, output_format, …]) Write a given UCCA passage in any format.

Classes

ServerAccessor(server_address, email, password)
TaskDownloader(**kwargs)
tqdm([iterable, desc, total, leave, file, …]) Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested.

Class Inheritance Diagram

Inheritance diagram of uccaapp.download_task.TaskDownloader

uccaapp.upload_conllu_passages Module

Functions

from_text(text[, passage_id, tokenized, …]) Converts from tokenized strings to a Passage object.
glob(pathname, *[, recursive]) Return a list of paths matching a pathname pattern.
main(**kwargs)
to_json(passage, *args[, return_dict, …]) Convert a Passage object to text (or dict) in UCCA-App JSON :param passage: the Passage object to convert :param return_dict: whether to return dict rather than list of lines :param tok_task: either None (to do tokenization too), or a completed tokenization task dict with token IDs, or True, to indicate that the function should do only tokenization and not annotation :param all_categories: list of category dicts so that IDs can be added, if available - otherwise names are used :param skip_category_mapping: if False, translate edge tag abbreviations to category names; if True, don’t :return: list of lines in JSON format if return_dict=False, or task dict if True

Classes

ConlluPassageUploader(user_id, …)
JSONDecodeError(msg, doc, pos) Subclass of ValueError with the following additional properties:
ServerAccessor(server_address, email, password)

Class Inheritance Diagram

Inheritance diagram of uccaapp.upload_conllu_passages.ConlluPassageUploader

uccaapp.upload_streussel_passages Module

Functions

from_text(text[, passage_id, tokenized, …]) Converts from tokenized strings to a Passage object.
main(**kwargs)
to_json(passage, *args[, return_dict, …]) Convert a Passage object to text (or dict) in UCCA-App JSON :param passage: the Passage object to convert :param return_dict: whether to return dict rather than list of lines :param tok_task: either None (to do tokenization too), or a completed tokenization task dict with token IDs, or True, to indicate that the function should do only tokenization and not annotation :param all_categories: list of category dicts so that IDs can be added, if available - otherwise names are used :param skip_category_mapping: if False, translate edge tag abbreviations to category names; if True, don’t :return: list of lines in JSON format if return_dict=False, or task dict if True

Classes

ServerAccessor(server_address, email, password)
StreusselPassageUploader(user_id, source_id, …)

Class Inheritance Diagram

Inheritance diagram of uccaapp.upload_streussel_passages.StreusselPassageUploader

uccaapp.upload_task Module

Functions

get_passages_with_progress_bar(filename_patterns)
main(**kwargs)
to_json(passage, *args[, return_dict, …]) Convert a Passage object to text (or dict) in UCCA-App JSON :param passage: the Passage object to convert :param return_dict: whether to return dict rather than list of lines :param tok_task: either None (to do tokenization too), or a completed tokenization task dict with token IDs, or True, to indicate that the function should do only tokenization and not annotation :param all_categories: list of category dicts so that IDs can be added, if available - otherwise names are used :param skip_category_mapping: if False, translate edge tag abbreviations to category names; if True, don’t :return: list of lines in JSON format if return_dict=False, or task dict if True
to_text(passage[, sentences, lang]) Converts from a Passage object to tokenized strings.

Classes

HTTPError(*args, **kwargs) An HTTP error occurred.
JSONDecodeError(msg, doc, pos) Subclass of ValueError with the following additional properties:
ServerAccessor(server_address, email, password)
TaskUploader(user_id, source_id, project_id, …)

Class Inheritance Diagram

Inheritance diagram of uccaapp.upload_task.TaskUploader