diff --git a/corpus2tools/corpus-get b/corpus2tools/corpus-get index c16e4e9a76e2b205af9808ce255b0712e416e026..6d050b0c6851602300f37d1980939885b9967350 100755 --- a/corpus2tools/corpus-get +++ b/corpus2tools/corpus-get @@ -21,11 +21,11 @@ def parse_range_info(s): try: selection.add(int(elem)) except: - split = [x.strip() for x in elem.split('-')] + split = [int(x.strip()) for x in elem.split('-')] try: if len(split) == 2: split.sort() - for x in xrange(int(split[0]), int(split[1])+1): + for x in xrange(split[0], split[1]+1): selection.add(x) else: raise @@ -98,6 +98,7 @@ def go(): reader = corpus2.TokenReader.create_path_reader(options.input_format, tagset, inpath) writer = corpus2.TokenWriter.create_stdout_writer(options.output_format, tagset) selection = {} + for arg in args[1:]: if ':' in arg: sp = arg.split(':')