Skip to content

Commit

Permalink
add new kinds of search
Browse files Browse the repository at this point in the history
  • Loading branch information
interrogator committed Nov 6, 2019
1 parent 1434ca1 commit e493ad9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 2 additions & 3 deletions buzzword/parts/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ def _correct_placeholder(value):
"""
More accurate placeholder text when doing dependencies
"""
if value == "d":
if value in {"bigrams", "trigrams", "describe", "d"}:
return "Enter depgrep query..."
else:
return "Enter regular expression search query..."
return "Enter regular expression search query..."


@app.callback(
Expand Down
8 changes: 7 additions & 1 deletion buzzword/parts/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ def _build_dataset_space(df, config):
if isinstance(df, Corpus):
df = df.files[0].load()
cols = _get_cols(df, config["add_governor"])
cols = [dict(label="Dependencies", value="d")] + cols
extra = [("Dependencies", "d"),
("Descriptors", "describe"),
("Bigrams", "bigrams"),
("Trigrams", "trigrams")
]
extra = [dict(label=l, value=v) for l, v in extra]
cols = extra + cols
df = _drop_cols_for_datatable(df, config["add_governor"])
df = df.reset_index()
max_row, max_col = config["table_size"]
Expand Down

0 comments on commit e493ad9

Please sign in to comment.