Spaces:
Runtime error
Runtime error
Neal Caren
commited on
Commit
·
adcac3d
1
Parent(s):
1819245
Expander v1
Browse files
app.py
CHANGED
|
@@ -62,16 +62,16 @@ no_of_articles = len(df['cite'].value_counts())
|
|
| 62 |
|
| 63 |
|
| 64 |
notes = f'''Notes:
|
| 65 |
-
* I have found three types of searches
|
| 66 |
* Phrases or specific topics, such as "inequality in latin america", "race color skin tone measurement", "audit study experiment gender", or "logistic regression or linear probability model".
|
| 67 |
* Citations to well-known works, either using author year ("bourdieu 1984") or author idea ("Crenshaw intersectionality")
|
| 68 |
-
* Questions
|
| 69 |
* The search expands beyond exact matching, so "asia social movements" may return paragraphs on Asian-Americans politics and South Korean labor unions.
|
| 70 |
* The first search can take up to 10 seconds as the files load. After that, it's quicker to respond.
|
| 71 |
* The most relevant paragraph to your search is returned first, along with up to four other related paragraphs from that article.
|
| 72 |
* The most relevant sentence within each paragraph, as determined by math, is bolded.
|
| 73 |
* The results are not exhaustive, and seem to drift off even when you suspect there are more relevant articles :man-shrugging:.
|
| 74 |
-
* The dataset currently includes articles published in the last five years in *Mobilization*, *Social Forces*, *Social Problems*, *Sociology of Race and Ethnicity*, *Gender and Society*, *Socius*, *JHSB*, *Annual Review of Sociology*, and the *American Sociological Review
|
| 75 |
* Behind the scenes, the semantic search uses [text embeddings](https://www.sbert.net) with a [retrieve & re-rank](https://colab.research.google.com/github/UKPLab/sentence-transformers/blob/master/examples/applications/retrieve_rerank/retrieve_rerank_simple_wikipedia.ipynb) process to find the best matches.
|
| 76 |
* Let [me](mailto:neal.caren@unc.edu) know what you think or it looks broken.
|
| 77 |
'''
|
|
@@ -151,7 +151,8 @@ def search(query, top_k=50):
|
|
| 151 |
cite = cite.replace(", ", '. "').replace(', Social ', '", Social ')
|
| 152 |
st.write(cite)
|
| 153 |
for graph in graphs[:5]:
|
| 154 |
-
st.
|
|
|
|
| 155 |
st.write('')
|
| 156 |
# print("\t{:.3f}\t{}".format(hit['cross-score'], passages[hit['corpus_id']].replace("\n", " ")))
|
| 157 |
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
notes = f'''Notes:
|
| 65 |
+
* I have found three types of searches work best:
|
| 66 |
* Phrases or specific topics, such as "inequality in latin america", "race color skin tone measurement", "audit study experiment gender", or "logistic regression or linear probability model".
|
| 67 |
* Citations to well-known works, either using author year ("bourdieu 1984") or author idea ("Crenshaw intersectionality")
|
| 68 |
+
* Questions, like "What is a topic model?" or "How did Weber define bureaucracy?"
|
| 69 |
* The search expands beyond exact matching, so "asia social movements" may return paragraphs on Asian-Americans politics and South Korean labor unions.
|
| 70 |
* The first search can take up to 10 seconds as the files load. After that, it's quicker to respond.
|
| 71 |
* The most relevant paragraph to your search is returned first, along with up to four other related paragraphs from that article.
|
| 72 |
* The most relevant sentence within each paragraph, as determined by math, is bolded.
|
| 73 |
* The results are not exhaustive, and seem to drift off even when you suspect there are more relevant articles :man-shrugging:.
|
| 74 |
+
* The dataset currently includes articles published in the last five years in *Mobilization*, *Social Forces*, *Social Problems*, *Sociology of Race and Ethnicity*, *Gender and Society*, *Socius*, *JHSB*, *Annual Review of Sociology*, and the *American Sociological Review*.
|
| 75 |
* Behind the scenes, the semantic search uses [text embeddings](https://www.sbert.net) with a [retrieve & re-rank](https://colab.research.google.com/github/UKPLab/sentence-transformers/blob/master/examples/applications/retrieve_rerank/retrieve_rerank_simple_wikipedia.ipynb) process to find the best matches.
|
| 76 |
* Let [me](mailto:neal.caren@unc.edu) know what you think or it looks broken.
|
| 77 |
'''
|
|
|
|
| 151 |
cite = cite.replace(", ", '. "').replace(', Social ', '", Social ')
|
| 152 |
st.write(cite)
|
| 153 |
for graph in graphs[:5]:
|
| 154 |
+
with st.expander("Thesis Goes here"):
|
| 155 |
+
st.write(f'* {graph}')
|
| 156 |
st.write('')
|
| 157 |
# print("\t{:.3f}\t{}".format(hit['cross-score'], passages[hit['corpus_id']].replace("\n", " ")))
|
| 158 |
|