Exemple #1
0
    def run(self, args, state):
        from jazzparser.parser import list_results, remove_complex_categories

        state.results = remove_complex_categories(state.results,
                                                  state.formalism)
        # Print the new list
        list_results(state.results, state.options.silent)
Exemple #2
0
    def run(self, args, state):
        from jazzparser.parser import list_results
        from .shell import ShellError

        if len(args) == 1:
            res = int(args[0])
            print "Showing result %d" % res
            result_list = [state.results[res]]
        elif len(args) == 2:
            start, end = int(args[0]), int(args[1])
            print "Showing results in range [%s:%s]" % (start, end)
            result_list = state.results[start:end]
        else:
            result_list = state.results

        # Display results again
        if state.options is not None:
            list_results(result_list, state.options.silent)
        else:
            list_results(result_list)
Exemple #3
0
 def run(self, args, state):
     from jazzparser.parser import list_results
     from .shell import ShellError
     
     if len(args) == 1:
         res = int(args[0])
         print "Showing result %d" % res
         result_list = [state.results[res]]
     elif len(args) == 2:
         start,end = int(args[0]), int(args[1])
         print "Showing results in range [%s:%s]" % (start,end)
         result_list = state.results[start:end]
     else:
         result_list = state.results
     
     # Display results again
     if state.options is not None:
         list_results(result_list, state.options.silent)
     else:
         list_results(result_list)
Exemple #4
0
 def run(self, args, state):
     from jazzparser.parser import list_results, remove_complex_categories
     
     state.results = remove_complex_categories(state.results, state.formalism)
     # Print the new list
     list_results(state.results, state.options.silent)