def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help="a file where each line is a <User ID> <TOKENIZATION TASK ID>"
     )
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #2
0
 def add_arguments(argparser):
     argparser.add_argument("task_ids",
                            nargs="+",
                            type=int,
                            help="IDs of tasks to download and convert")
     TaskDownloader.add_write_arguments(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #3
0
 def add_arguments(argparser):
     argparser.add_argument("task_ids",
                            nargs="+",
                            help="IDs of tasks to download and convert")
     argparser.add_argument("-f",
                            "--by-filename",
                            action="store_true",
                            help="treat task_ids as a filename, "
                            "otherwise it is a list of IDs")
     TaskDownloader.add_write_arguments(argparser)
     argparser.add_argument(
         "-V",
         "--validate",
         help="run validation on downloaded passages and save errors to file"
     )
     argparser.add_argument("-N",
                            "--normalize",
                            action="store_true",
                            help="normalize downloaded passages")
     argparser.add_argument("--strict",
                            action="store_true",
                            help="fail on reading or normalization error")
     argparser.add_argument(
         "-l",
         "--log",
         help="filename to write log of downloaded passages to")
     ServerAccessor.add_arguments(argparser)
Beispiel #4
0
 def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help="file with lines of the form <EXTERNAL ID> <PASSAGE ID>")
     argparser.add_argument("--by-task-id",
                            action="store_true",
                            help="expect task ID instead of passage ID")
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument("filename", help="a file where each line is a <User ID> <INPUT TASK ID>, "
                                             "where the input task may be an annotation/review task "
                                             "(if given --review) or a tokenization task")
     ServerAccessor.add_arguments(argparser)
     argparser.add_argument("-r", "--review", action="store_true", help="Create annotation/review task")
     argparser.add_argument("-l", "--log", help="filename to write log of uploaded passages to")
     argparser.add_argument("--manager-comment", help="Manager comment to set for all tasks")
Beispiel #6
0
 def add_arguments(argparser):
     argparser.add_argument("filenames",
                            nargs="+",
                            help="passage file names to convert and upload")
     argparser.add_argument("--user-id",
                            type=int,
                            help="user id, otherwise set by " +
                            USER_ID_ENV_VAR)
     ServerAccessor.add_arguments(argparser)
Beispiel #7
0
def main(args):
    server_accessor_origin = ServerAccessor(server_address=args.server_address_orig,
                                            email=args.email_orig, password=args.password_orig,auth_token=None,verbose=True)
    server_accessor_target = ServerAccessor(server_address=args.server_address_target,
                                            email=args.email_target, password=args.password_target,auth_token=None,verbose=True)
    for category_id in args.category_ids:
        #try:
        category_out = server_accessor_origin.get_category(category_id)
        server_accessor_target.create_category(**category_out)
Beispiel #8
0
 def add_arguments(argparser):
     argparser.add_argument("task_ids", nargs="+", help="IDs of tasks to download and convert")
     argparser.add_argument("-f", "--by-filename", action="store_true", help="treat task_ids as a filename, "
                                                                             "otherwise it is a list of IDs")
     TaskDownloader.add_write_arguments(argparser)
     argparser.add_argument("-V", "--validate", help="run validation on downloaded passages and save errors to file")
     argparser.add_argument("-N", "--normalize", action="store_true", help="normalize downloaded passages")
     argparser.add_argument("-l", "--log", help="filename to write log of downloaded passages to")
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument("filenames",
                            nargs="+",
                            help="filename pattern of CoNLL-U files")
     ServerAccessor.add_user_id_argument(argparser)
     argparser.add_argument(
         "--annotation-user-id",
         type=int,
         help="user id for annotation tasks, if different")
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument("filenames", nargs="+", help="filename pattern of CoNLL-U files")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     argparser.add_argument("--annotation-user-id", type=int, help="user id for annotation tasks, if different")
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument("filenames",
                            help="passage file names to convert and upload")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #12
0
 def add_arguments(argparser):
     argparser.add_argument("filenames",
                            nargs="+",
                            help="passage file names to convert and upload")
     argparser.add_argument(
         "-l",
         "--log",
         help="filename to write log of uploaded passages to")
     argparser.add_argument("--no-submit",
                            action="store_false",
                            dest="submit",
                            help="do not submit annotation task")
     argparser.add_argument(
         "--existing-ids",
         help=
         "use existing task IDs from file (output of --log); no creation")
     argparser.add_argument("-n",
                            "--no-upload",
                            action="store_false",
                            dest="upload",
                            help="do not upload anything")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #13
0
 def add_arguments(argparser):
     argparser.add_argument("filenames", nargs="+", help="passage file names to convert and upload")
     argparser.add_argument("-l", "--log", help="filename to write log of uploaded passages to")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help="a file where each line is a <User ID> <INPUT TASK ID>, "
         "where the input task may be an annotation/review task "
         "(if given --review) or a tokenization task")
     ServerAccessor.add_arguments(argparser)
     argparser.add_argument("-r",
                            "--review",
                            action="store_true",
                            help="Create annotation/review task")
     argparser.add_argument(
         "-l",
         "--log",
         help="filename to write log of uploaded passages to")
     argparser.add_argument("--manager-comment",
                            help="Manager comment to set for all tasks")
Beispiel #15
0
 def add_arguments(argparser):
     argparser.add_argument("filenames",
                            help="passage file names to convert and upload")
     argparser.add_argument(
         "-l",
         "--log",
         help="filename to write log of uploaded passages to")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #16
0
 def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help="a file where each line is a <User ID> <Passage ID>")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #17
0
def main(args):
    server_accessor_origin = ServerAccessor(
        server_address=args.server_address_orig,
        email=args.email_orig,
        password=args.password_orig,
        verbose=args.verbose)
    server_accessor_target = ServerAccessor(
        server_address=args.server_address_target,
        email=args.email_target,
        password=args.password_target,
        verbose=args.verbose)
    for category_id in args.category_ids:
        category_out = server_accessor_origin.get_category(category_id)
        server_accessor_target.create_category(**category_out)
Beispiel #18
0
 def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help=
         "text file with one line paragraph, where paragraphs are separated "
         "by multiple newlines and an optional <DELIMITER>")
     argparser.add_argument(
         "-l",
         "--log",
         help="filename to write log of uploaded passages to")
     argparser.add_argument("--lang",
                            choices=["ru", "en", "fr", "de"],
                            default="ru",
                            help="language two-letter code, for tokenizer")
     ServerAccessor.add_project_id_argument(argparser)
     ServerAccessor.add_source_id_argument(argparser)
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #19
0
    def add_arguments(argparser):
        argparser.add_argument("filename", help="file with lines, each with a different task ID")
        argparser.add_argument("-l","--log_file", help="output log file")

        ServerAccessor.add_arguments(argparser)
Beispiel #20
0
 def add_arguments(argparser):
     argparser.add_argument("filename",
                            help="file with lines of the form <TASK ID>")
     ServerAccessor.add_arguments(argparser)
Beispiel #21
0
 def add_arguments(argparser):
     argparser.add_argument("filename", help="file with lines of the form <EXTERNAL ID> <PASSAGE ID>")
     argparser.add_argument("--by-task-id", action="store_true", help="expect task ID instead of passage ID")
     ServerAccessor.add_arguments(argparser)
Beispiel #22
0
 def add_arguments(argparser):
     argparser.add_argument(
         "filename",
         help="file with lines of the form <EXTERNAL ID> <PASSAGE ID>")
     ServerAccessor.add_arguments(argparser)
Beispiel #23
0
 def add_arguments(argparser):
     argparser.add_argument("filenames", nargs="+", help="passage file names to convert and upload")
     ServerAccessor.add_user_id_argument(argparser)
     ServerAccessor.add_arguments(argparser)
 def add_arguments(argparser):
     argparser.add_argument("filename", help="file with lines, each with a different task ID")
     argument_parser.add_argument("-s", "--status", help="should be ONGOING or SUBMITTED",
                                  choices=[ONGOING_STATUS, SUBMITTED_STATUS])
     ServerAccessor.add_arguments(argparser)
Beispiel #25
0
    def add_arguments(argparser):
        argparser.add_argument("filename", help="file with lines, each with a different task ID")
        argparser.add_argument("-l","--log_file", help="output log file")

        ServerAccessor.add_arguments(argparser)
Beispiel #26
0
 def add_arguments(argparser):
     argparser.add_argument("task_ids", nargs="+", type=int, help="IDs of tasks to download and convert")
     TaskDownloader.add_write_arguments(argparser)
     ServerAccessor.add_arguments(argparser)
Beispiel #27
0
 def add_arguments(argparser):
     argparser.add_argument("filenames", nargs="+", help="passage file names to convert and upload")
     argparser.add_argument("--user-id", type=int, help="user id, otherwise set by " + USER_ID_ENV_VAR)
     ServerAccessor.add_arguments(argparser)
Beispiel #28
0
 def add_arguments(argparser):
     argparser.add_argument("filename", help="file with lines, each with a different task ID")
     ServerAccessor.add_arguments(argparser)
Beispiel #29
0
 def add_arguments(argparser):
     argparser.add_argument("filename", help="file with lines of the form <TASK ID>")
     ServerAccessor.add_arguments(argparser)