prashant
commited on
Commit
·
97216b9
1
Parent(s):
e24948b
semantic update
Browse files
appStore/keyword_search.py
CHANGED
@@ -49,6 +49,9 @@ def app():
|
|
49 |
|
50 |
searchtype = st.selectbox("Do you want to find exact macthes or similar meaning/context",
|
51 |
['Exact Matches', 'Similar context/meaning'])
|
|
|
|
|
|
|
52 |
|
53 |
|
54 |
|
@@ -73,7 +76,6 @@ def app():
|
|
73 |
else:
|
74 |
if 'filepath' in st.session_state:
|
75 |
|
76 |
-
|
77 |
if searchtype == 'Exact Matches':
|
78 |
paraList = runLexicalPreprocessingPipeline()
|
79 |
logging.info("performing lexical search")
|
@@ -81,7 +83,7 @@ def app():
|
|
81 |
st.markdown("##### Top few lexical search (TFIDF) hits #####")
|
82 |
lexical_search(queryList,paraList)
|
83 |
else:
|
84 |
-
|
85 |
paraList = runSemanticPreprocessingPipeline()
|
86 |
logging.info("starting semantic search")
|
87 |
with st.spinner("Performing Similar/Contextual search"):
|
|
|
49 |
|
50 |
searchtype = st.selectbox("Do you want to find exact macthes or similar meaning/context",
|
51 |
['Exact Matches', 'Similar context/meaning'])
|
52 |
+
if searchtype == 'Similar context/meaning':
|
53 |
+
show_answers = st.sidebar.checkbox("Show context")
|
54 |
+
|
55 |
|
56 |
|
57 |
|
|
|
76 |
else:
|
77 |
if 'filepath' in st.session_state:
|
78 |
|
|
|
79 |
if searchtype == 'Exact Matches':
|
80 |
paraList = runLexicalPreprocessingPipeline()
|
81 |
logging.info("performing lexical search")
|
|
|
83 |
st.markdown("##### Top few lexical search (TFIDF) hits #####")
|
84 |
lexical_search(queryList,paraList)
|
85 |
else:
|
86 |
+
|
87 |
paraList = runSemanticPreprocessingPipeline()
|
88 |
logging.info("starting semantic search")
|
89 |
with st.spinner("Performing Similar/Contextual search"):
|