Commit afa3163c authored by Dos Santos David's avatar Dos Santos David

small refactor

parent 283f342f
from gogole.commands import analyze_command, index_command, search_command from gogole.commands import analyze_command, index_command, search_command
MAIN_COMMANDS_MAP = { MAIN_COMMANDS_MAP = {
'analyze': analyze_command.run_analyze_command, 'analyze': analyze_command.run,
'index': index_command.run_index_command, 'index': index_command.run,
'search': search_command.run 'search': search_command.run
} }
...@@ -7,7 +7,7 @@ from gogole.utils import heap_law ...@@ -7,7 +7,7 @@ from gogole.utils import heap_law
COMMANDS = ['all', 'count_tokens', 'heap_law'] COMMANDS = ['all', 'count_tokens', 'heap_law']
def run_analyze_command(collection, args): def run(collection, args):
parser = collection.parser parser = collection.parser
tokenizer = collection.tokenizer tokenizer = collection.tokenizer
......
def run_index_command(collection, args): def run(collection, args):
parser = collection.parser parser = collection.parser
tokenizer = collection.tokenizer tokenizer = collection.tokenizer
indexer = collection.indexer indexer = collection.indexer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment