diff --git a/README.md b/README.md index f99327ef619da5147e06ef68162987a26d7c1add..f41a059ba79893110c82825c2eb2188f71077db9 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,39 @@ -**[Installation](Documentation/Documentation_Quick_Start.md)** | -**[Documentation](#documentation)** | -**[Contributing](contributing.md)** | -**[Testing](#testing)** | -**[License](license.md)** | -**[Manuscript](Documentation/manuscript.md)** | +[](https://travis-ci.com/russelljjarvis/ScienceAccessibility) +[](https://mybinder.org/v2/gh/russelljjarvis/ScienceAccess/master) -[](https://travis-ci.com/russelljjarvis/ScienceAccessibility) -[](https://mybinder.org/v2/gh/russelljjarvis/simple_science_access.git/master) + +**** + +**First Step** +``` +git clone https://github.com/russelljjarvis/ScienceAccess.git +cd ScienceAccess + +``` + +**If you don't have python3:** +``` +sudo bash install_python3.sh +``` + +**Installation Apple** +``` +sudo bash apple_setup.sh +``` + +**Installation Linux** +``` +sudo bash setup.sh +``` +**Run** +``` +streamlit run app.py +``` + +**[Manuscript](https://github.com/russelljjarvis/ScienceAccessibility/blob/remaster/Documentation/manuscript.md)** # Overview @@ -82,60 +106,5 @@ Multiple stakeholders benefit when science is communicated with lower complexity The impact of science on society is likely proportional to the accessibility of written work. Objectively describing the character of the different writing styles will allow us to prescribe how, to shift academic science writing into a more accessible niche, where science can more aggressively compete with pseudo-science, and blogs. -## Analysis of Text. -Running the scraper is not necessary for analysing the text documents. - -## Sentiment Versus Complexity - -[An interactive plot of the same thing, where clicking on a data point takes you to the webpage that generated the data point](https://russelljjarvis.github.io/ScienceAccessibility/) - - -### Word frequencies as clouds: -### Per category -#### Not Science - -#### Science - - - -The observant reader will see, 'et al', occurs in published literature quite a lot, highlighting an obvious finding that science writing often refers to external evidence. - - [Similar projects](https://blog.machinebox.io/detect-fake-news-by-building-your-own-classifier-31e516418b1d). - -## Building All of the Project. -(including the scraper). - -The internet in some ways is like a big group of computers that are all friends with each. A scraper is A computer that visits many of the other computers on the internet. The scraper does not have to be friends with the computers it visits, it just needs to know the address at which each computer in the big friendship group can be reached. - -The scraping and crawling code for this is dependency heavy. Who wants to duplicate the building of this whole environment from scratch? No-one? I thought so. [Docker is used to providing a universal build, and prevent duplicated effort](https://hub.docker.com/r/russelljarvis/science_accessibility). - -If Docker is installed on the base OS, git clone this repository, and assuming the file build.sh is chmod +x , run: `bash build.sh` to perform the dockerbuild. To run the jupyter notebook over docker, enter the docker environment interactively in one of two ways, via a bash shell, or via an ipython notebook or -and then launch python via BASH in Linux as follows: - -Warning: This Docker environment is currently 11.5GB, however it contains some non trivial scraping tools. - -```BASH -docker login your_user_name@dockerhub.com -docker pull russelljarvis/science_accessibility -mkdir $HOME/data_words -docker run -it -v $HOME/data_words russelljarvis/science_accessibility -``` -```BASH -cd Examples -ipython -i enter_author_name.py "R Gerkin" -``` - -To Run the project, you need to navigate to the Examples directory and then execute: -`python use_scrape.py`, which scrapes search engines for parameters defined in that file. -Once that is done an analysis program `use_analysis` is then called to run an analysis on the scraped text. This program generates some simple figures. The figures are very basic, and they act to function only as proof of concept. - -Given pre-existing data (pickled files consisting of raw text contents), the analysis file can also be run on its own by executing: `python use_analysis.py`. To analyse the scraped texts, the Jupyter notebook: `vstrl.ipynb` also contains idioms for plotting and analysis based on scrapped data, although it is not maintained. The package Bokeh facilitates pretty interactive plots with data point mouse over data metrics. - -Another file `Examples/use_code_complexity.py` reports back about the complexity of the code base. This code complexity analysis is not thorough enough to include third-party modules that were heavily utilized in the analysis, however, the principle of code complexity, with an application limited scope is generally applied in our approach, as it's obviously not desirable to use obfuscated code as a tool used to advocate for a simple language. - - - -### What about Code Cognitive Complexity? -That is an issue too. The project takes measures to minimize that also. Many modern text editors feature cyclomatic complexity plugins. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c015fb1144b2ecad77619386537e9c1f62e4ad5b --- /dev/null +++ b/__init__.py @@ -0,0 +1,4 @@ +name = "SComplexity" +#from .crawl import * +from .utils import * +from .t_analysis import * diff --git a/_author_specific.p b/_author_specific.p new file mode 100644 index 0000000000000000000000000000000000000000..b691660dea1cef22a2aa397099380ed9e1f3c906 Binary files /dev/null and b/_author_specific.p differ diff --git a/_author_specificAdam Harris.p b/_author_specificAdam Harris.p new file mode 100644 index 0000000000000000000000000000000000000000..157816260f532eef7badeaea4eafa3b98c278fed Binary files /dev/null and b/_author_specificAdam Harris.p differ diff --git a/_author_specificR Gerkin.p b/_author_specificR Gerkin.p new file mode 100644 index 0000000000000000000000000000000000000000..96b0ed191aff5e175ca7e95da82fcb9fabb02a7c Binary files /dev/null and b/_author_specificR Gerkin.p differ diff --git a/_author_specificRebecca Metcalf.p b/_author_specificRebecca Metcalf.p new file mode 100644 index 0000000000000000000000000000000000000000..2835f5417ce8b4752dacc3f4cc016b5aae45c4b5 Binary files /dev/null and b/_author_specificRebecca Metcalf.p differ diff --git a/_author_specificS Jarvis.p b/_author_specificS Jarvis.p new file mode 100644 index 0000000000000000000000000000000000000000..700afa847a1364cebde6763326407b6688be6349 Binary files /dev/null and b/_author_specificS Jarvis.p differ diff --git a/_author_specificS Phatak.p b/_author_specificS Phatak.p new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/_author_specificSarah Jarvis.p b/_author_specificSarah Jarvis.p new file mode 100644 index 0000000000000000000000000000000000000000..eff93faa2221f12e947a68a02e4884837e7aee66 Binary files /dev/null and b/_author_specificSarah Jarvis.p differ diff --git a/align_data_sources.py b/align_data_sources.py new file mode 100644 index 0000000000000000000000000000000000000000..a792d0cc8ed06f58a84704d3138b0d8e9f5e841f --- /dev/null +++ b/align_data_sources.py @@ -0,0 +1,17 @@ + +import nltk +try: + from nltk.corpus import stopwords + stop_words = stopwords.words('english') +except: + nltk.download('punkt') + nltk.download('stopwords') + +if not(os.path.exists('traingDats.p?dl=0') or os.path.exists('data/traingDats.p')): + + os.system('wget https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p?dl=0') + os.system('wget https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0') + +if os.path.exists("traingDats.p?dl=0") and not os.path.exists("data/traingDats.p"): + os.system('mv traingDats.p?dl=0 data/traingDats.p') + os.system('mv benchmarks.p?dl=0 data/benchmarks.p') diff --git a/analysis.py b/analysis.py new file mode 100644 index 0000000000000000000000000000000000000000..b474149b84e3c4bd1f97c6c7d850be4d904222a9 --- /dev/null +++ b/analysis.py @@ -0,0 +1,64 @@ + +import glob +import os +import dask.bag as db + +from SComplexity.utils import html_to_txt, convert_pdf_to_txt +from SComplexity.t_analysis import text_proc + +from natsort import natsorted, ns +import pprint +import pickle +import numpy as np +import os + + +def print_best_text(f): + link_tuple = pickle.load(open(f,'rb')) + se_b, page_rank, link, category, buff_ = link_tuple + return buff_ + + + +class Analysis(object): + def __init__(self,files, min_word_length = 200, urlDats=None): + self.files = files + self.urlDats = urlDats + self.mwl = min_word_length + + def convert_and_score(self,f): + urlDat = {} + b = os.path.getsize(f) + link_tuple = pickle.load(open(f,'rb')) + se_b, page_rank, link, category, buff_ = link_tuple + if buff_ is not None: + urlDat = { 'link':link,'page_rank':page_rank,'se':se_b,'query':category,'file':f } + urlDat = text_proc(buff_,urlDat, WORD_LIM = self.mwl) + return urlDat + + def cas(self): + # Do in parallel as it is 2018 + + pgrid = db.from_sequence(self.files,npartitions=8) + urlDats = list(db.map(self.convert_and_score,pgrid).compute()) + # just kidding need to do a serial debug often times, regardless of parallel speed up. + #urlDats = list(map(self.convert_and_score,self.files)) + urlDats = [ url for url in urlDats if type(url) is not type(None) ] + #urlDats = list(filter(lambda url: type(url) != None, urlDats)) + urlDats = list(filter(lambda url: len(list(url))>3, urlDats)) + + urlDats = list(filter(lambda url: len(list(url.keys()))>3, urlDats)) + # urlDats = list(filter(lambda url: str('penalty') in url.keys(), urlDats)) + if type(self.urlDats) is not type(None): + urlDats.extend(self.urlDats) + return urlDats + + def get_reference_web(self): + from SComplexity.scrape import SW + from SComplexity.get_bmark_corpus import get_bmarks + return get_bmarks() + + #def get_reference_pickle(self): + # known_corpus = [] + # from SComplexity.get_bmark_corpus import get_bmarks + # return get_bmarks() diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..c4864d0f96c024fdc1a6e413c28dd55c311df6b3 --- /dev/null +++ b/app.py @@ -0,0 +1,243 @@ + + +import streamlit as st +import os + +import matplotlib.pyplot as plt +import seaborn as sns +from wordcloud import WordCloud +print(os.system("which firefox")) + +from online_app_backend import call_from_front_end +from online_app_backend import ar_manipulation + + +import pandas as pd +import pickle +import numpy as np +import plotly.figure_factory as ff +import os +import plotly.express as px + +#from plotly.subplots import make_subplots + +import nltk + +trainingDats = pickle.load(open('data/traingDats.p','rb')) +bio_chem = [ t['standard'] for t in trainingDats ] +biochem_labels = [ x['file_name'] for x in trainingDats if 'file_name' in x.keys()] +biochem_labels = [x.split("/")[-1] for x in biochem_labels ] + +lods = [] +for i,j,k in zip(bio_chem,[str('Comparison Data') for i in range(0,len(bio_chem))],biochem_labels): + lods.append({'Reading_Level':i,'Origin':j,'Web_Link':k}) +df0 = pd.DataFrame(lods) + +theme = px.colors.diverging.Portland +colors = [theme[0], theme[1]] +st.title('Search Reading Difficulty of Academic') +author_name = st.text_input('Enter Author:') +def make_clickable(link): + # target _blank to open new window + # extract clickable text to display for your link + text = link#.split('=')[1] + return f'<a target="_blank" href="{link}">{text}</a>' + + +if author_name: + ar = call_from_front_end(author_name) + standard_sci = [ t['standard'] for t in ar ] + group_labels = ['Author: '+str(author_name)]#, 'Group 2', 'Group 3'] + scraped_labels = [ str(x['link']) for x in ar] + + + lods = [] + for i,j,k in zip(standard_sci,[str(author_name) for i in range(0,len(ar))],scraped_labels): + lods.append({'Reading_Level':i,'Origin':j,'Web_Link':k}) + df1 = pd.DataFrame(lods) + df = pd.concat([df1,df0]) + + fig0 = px.histogram(df, x="Reading_Level", y="Web_Link", color="Origin", + marginal="box", + opacity=0.7,# marginal='violin',# or violin, rug + hover_data=df.columns, + hover_name=df["Web_Link"], + color_discrete_sequence=colors) + + fig0.update_layout(title_text='Scholar scraped {0} Versus Art Corpus'.format(author_name),width=900, height=900)#, hovermode='x') + + st.write(fig0) + + +else: + + with open('data/_author_specificSayali Phatak.p','rb') as f: + contents = pickle.load(f) + (NAME,ar,df,datay,scholar_link) = contents + (ar, trainingDats) = ar_manipulation(ar) + standard_sci = [ t['standard'] for t in ar ] + + scraped_labels = [ str(x['link']) for x in ar] + group_labels = ['Author Scraped']#, 'Group 2', 'Group 3'] + lods = [] + for i,j,k in zip(standard_sci,[str('S Phatak') for i in range(0,len(ar))],scraped_labels): + lods.append({'Reading_Level':i,'Origin':j,'Web_Link':k}) + df1 = pd.DataFrame(lods) + df = pd.concat([df1,df0]) + + + + fig0 = px.histogram(df, x="Reading_Level", y="Web_Link", color="Origin", + marginal="box", + opacity=0.7,# marginal='violin',# or violin, rug + hover_data=df.columns, + hover_name=df["Web_Link"], + color_discrete_sequence=colors) + + fig0.update_layout(title_text='Scholar S Phatak Versus Art Corpus',width=900, height=600)#, hovermode='x') + + st.write(fig0) +''' + +### Total number scraped documents: + +''' +st.text(len(ar)) + +if np.mean(standard_sci) < np.mean(bio_chem): + ''' + + + ### This author was on average easier to read as the average of ARTCORPUS: + A varied collection of biochemistry science papers + ''' + +if np.mean(standard_sci) >= np.mean(bio_chem): + ''' + + + ### This author was on average harder or just as hard to read as average of ARTCORPUS: + A varied collection of biochemistry science papers + ''' + + +sci_corpus = '' + +for t in ar: + if 'tokens' in t.keys(): + for s in t['tokens']: + sci_corpus+=str(' ')+s + + +def art_cloud(acorpus): + + # Generate a word cloud image + + wordcloud = WordCloud().generate(acorpus) + fig = plt.figure() + + plt.imshow(wordcloud, interpolation='bilinear') + plt.axis("off") + st.pyplot() + + return fig + + +''' + + +### Here are some word clouds, that show the frequency of scraped texts +You can eye ball them to see if they fit your intuition about what your searched author writes about +''' +fig = art_cloud(sci_corpus) + + + + + +df_links = pd.DataFrame() +df_links['Web_Link'] = pd.Series(scraped_labels) +df_links['Reading_Level'] = pd.Series(standard_sci) +#st.write(df) +# link is the column with hyperlinks +df_links['Web_Link'] = df_links['Web_Link'].apply(make_clickable) +df_links = df_links.to_html(escape=False) +st.write(df_links, unsafe_allow_html=True) + +x1 = df0['Reading_Level']#np.random.randn(200) +x2 = df1['Reading_Level']#np.random.randn(200) + 2 +if author_name: + group_labels = ['Comparison Data ', str(author_name)] +else: + group_labels = ['Comparison Data ', str('S Phatak')] + + +colors = [theme[-1], theme[-2]] +rt=list(pd.Series(scraped_labels)) +fig = ff.create_distplot([x1, x2], group_labels, bin_size=2,colors=colors,rug_text=rt) + +hover_trace = [t for t in fig['data'] if 'text' in t] + +fig.update_layout(title_text='Scholar scraped Author Versus Art Corpus') +fig.update_layout(width=900, height=600)#, hovermode='x') + +st.write(fig) + +list_df = pickle.load(open("data/benchmarks.p","rb")) +bm = pd.DataFrame(list_df) + +bm = bm.rename(columns={'link': 'Web_Link', 'standard': 'Reading_Level'}) +bm["Origin"] = pd.Series(["Benchmark" for i in range(0,len(bm))]) + +bm = bm.drop(4, axis=0) +bm = bm.drop(5, axis=0) + +bm_temp = pd.DataFrame() +bm_temp["Origin"] = bm["Origin"] +bm_temp["Web_Link"] = bm["Web_Link"] +bm_temp["Reading_Level"] = bm["Reading_Level"] +import copy +bm = copy.copy(bm_temp) + +bm_temp['Web_Link'] = bm_temp['Web_Link'].apply(make_clickable) +bm_temp = bm_temp.to_html(escape=False) + +''' +In the table below there are benchmarks texts that are +used as a comparison to investigate some very easy to read scientific writing. +and some very cryptic and unreadable texts too. +''' + +st.write(bm_temp, unsafe_allow_html=True) + +x1 = bm['Reading_Level'] +x2 = df1['Reading_Level'] + +x3 = df0['Reading_Level'] + + +rt=list(bm['Web_Link']) +rt.extend(list(df1['Web_Link'])) +rt.extend(list(df0['Web_Link'])) + +colors = [theme[0], theme[4],theme[2]] +if author_name: + group_labels = ['Ideal Bench Marks ', str(author_name), str('Comparison Data')] +else: + group_labels = ['Ideal Bench Marks ', str('S Phatak'), str('Comparison Data')] + +fig = ff.create_distplot([x1, x2, x3], group_labels, bin_size=1,colors=colors,rug_text=rt) + +hover_trace = [t for t in fig['data'] if 'text' in t] + +fig.update_layout(title_text='Benchmarks versus scraped Author') +fig.update_layout(width=900, height=600)#, hovermode='x') + +st.write(fig) + +#ARTCORPUS = pickle.load(open('traingDats.p','rb')) +#acorpus = '' +#for t in ARTCORPUS: +# if 'tokens' in t.keys(): +# for s in t['tokens']: +# acorpus+=str(' ')+s \ No newline at end of file diff --git a/apple_setup.sh b/apple_setup.sh new file mode 100644 index 0000000000000000000000000000000000000000..296a8fe809c6a06072cc6ef5bbb3390639ca75e1 --- /dev/null +++ b/apple_setup.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# https://gist.github.com/mikesmullin/2636776 +if [[ $(uname) == "Darwin" ]]; then + which -s brew + if [[ $? != 0 ]] ; then + # Install Homebrew + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + else + brew update + fi + brew install jq + brew install wget + brew cask install firefox + brew install python-lxml + # brew install chromium-chromedriver + curl -s -L https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p + curl -s -L https://www.dropbox.com/s/crarli3772rf3lj/more_authors_results.p?dl=0 + curl -s -L https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0 + +elif [[ $(uname) == "Linux" ]]; then + sudo apt-get update + sudo apt-get install jq wget firefox + sudo apt-get install python-lxml + sudo apt-get install -y firefox + wget https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p?dl=0 + wget https://www.dropbox.com/s/crarli3772rf3lj/more_authors_results.p?dl=0 + wget https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0 + +else + echo "can't determine OS" + exit 1 +fi + +which -s python3 +if [[ $? != 0 ]] ; then + sudo bash install_python3.sh +fi +sudo bash gecko_install.sh +sudo python3 align_data_sources.py +sudo pip install --upgrade pip +sudo python -m pip install -U pip +sudo python3 -m pip install -r requirements.txt +sudo python3 -m pip install seaborn bs4 natsort dask plotly +sudo python3 -c "import nltk; nltk.download('punkt')" +sudo python3 -c "import nltk; nltk.download('stopwords')" + diff --git a/authors.py b/authors.py new file mode 100644 index 0000000000000000000000000000000000000000..46a2a49b488e6afd4c70af4c0b23990d019734ea --- /dev/null +++ b/authors.py @@ -0,0 +1,193 @@ +#import scholar +#from SComplexity. +#!pip install -e +git https://github.com/ckreibich/scholar.py +import sys +from scholar_scrape import scholar +import pandas as pd + +#sys.version_info[0] == 3: +unicode = str # pylint: disable-msg=W0622 +encode = lambda s: unicode(s) # pylint: disable-msg=C0103 ''' + +def csv(querier, header=False, sep='|'): + articles = querier.articles + results = [] + for art in articles: + result = art.as_csv(header=header, sep=sep) + results.append(result) + print(encode(result)) + header = False + return results +from delver import Crawler +C = Crawler() +import requests + +from SComplexity.crawl import collect_pubs +from SComplexity.scholar_scrape import scholar + +import io + +from delver import Crawler +C = Crawler() +import requests + + +import io + +import selenium + +from selenium import webdriver +from pyvirtualdisplay import Display + +display = Display(visible=0, size=(1024, 768)) +display.start() + + +#from StringIO import StringIO + +from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter +from pdfminer.converter import TextConverter +from pdfminer.layout import LAParams +from pdfminer.pdfpage import PDFPage +import os +import sys, getopt +from io import StringIO + +from selenium.webdriver.firefox.options import Options + +import re +from bs4 import BeautifulSoup +import bs4 as bs +import urllib.request +from io import StringIO +import io + +display = Display(visible=0, size=(1024, 768)) +display.start() + + +from selenium.webdriver.firefox.options import Options + +import re +from bs4 import BeautifulSoup + + +import PyPDF2 +from PyPDF2 import PdfFileReader +import textract + +def html_to_author(content,link): + soup = BeautifulSoup(content, 'html.parser') + + page = urllib.request.urlopen(url) + soup = BeautifulSoup(page, 'lxml') + mydivs = soup.findAll("h3", { "class" : "gsc_1usr_name"}) + outputFile = open('sample.csv', 'w', newline='') + outputWriter = csv.writer(outputFile) + for each in mydivs: + for anchor in each.find_all('a'): + print(anchor.text) + + + #strip HTML + ''' + for script in soup(["script", "style"]): + script.extract() # rip it out + text = soup.get_text() + wt = copy.copy(text) + #organize text + lines = (line.strip() for line in text.splitlines()) # break into lines and remove leading and trailing space on each + chunks = (phrase.strip() for line in lines for phrase in line.split(" ")) # break multi-headlines into a line each + text = '\n'.join(chunk for chunk in chunks if chunk) # drop blank lines + str_text = str(text) + ''' + return str_text + +def url_to_text(tuple_link): + index,link = tuple_link + buff = None + #se_b, page_rank, link, category, buff = link_tuple + if str('pdf') not in link: + if C.open(link) is not None: + content = C.open(link).content + #print(content) + content = requests.get(link, stream=True) + buff = html_to_author(content,link) + print(buff) + + else: + print('problem') + else: + pass + #pdf_file = requests.get(link, stream=True) + #f = io.BytesIO(pdf_file.content) + #reader = PdfFileReader(f) + #buff = reader.getPage(0).extractText().split('\n') + + import pdb; pdb.set_trace() + return buff + +#@jit +''' +def buffer_to_pickle(link_tuple): + se_b, page_rank, link, category, buff = link_tuple + link_tuple = se_b, page_rank, link, category, buff + fname = 'results_dir/{0}_{1}_{2}.p'.format(category,se_b,page_rank) + if type(buff) is not None: + with open(fname,'wb') as f: + pickle.dump(link_tuple,f) + return +''' +def process(item): + text = url_to_text(item) + + #buffer_to_pickle(text) + return + + +def search_author(author): + # from https://github.com/ckreibich/scholar.py/issues/80 + + querier = scholar.ScholarQuerier() + settings = scholar.ScholarSettings() + querier.apply_settings(settings) + query = scholar.SearchScholarQuery() + + query.set_words(str('author:')+author) + querier.send_query(query) + #results0 = csv(querier) + #results1 = citation_export(querier) + links = [ a.attrs['url'][0] for a in querier.articles if a.attrs['url'][0] is not None ] + sp = scholar.ScholarArticleParser() + #sp._parse_article(links[0]) + #[ process((index,l)) for index,l in enumerate(links) ] + import pdb + pdb.set_trace() + return links#, results1, links + +links = search_author('R Gerkin') + + +print(links) + + +''' +NUM_LINKS but can't be bothered refactoring. +def search_scholar(get_links): + # from https://github.com/ckreibich/scholar.py/issues/80 + se_,index,category,category,buff = get_links + querier = scholar.ScholarQuerier() + settings = scholar.ScholarSettings() + querier.apply_settings(settings) + query = scholar.SearchScholarQuery() + + query.set_words(category) + querier.send_query(query) + links = [ a.attrs['url'][0] for a in querier.articles if a.attrs['url'][0] is not None ] + #links = query.get_url() + #print(links) + #if len(links) > NUM_LINKS: links = links[0:NUM_LINKS] + + [ process((se_,index,l,category,buff)) for index,l in enumerate(links) ] + +''' diff --git a/benchmarks.p b/benchmarks.p new file mode 100644 index 0000000000000000000000000000000000000000..0e56a1adafb0ad73b0f885c83c1b7bdc2cbf36c3 Binary files /dev/null and b/benchmarks.p differ diff --git a/crawl.py b/crawl.py index 58077a085300d23b3540c7402165ed6fba627072..3a39ee04e1f18931dba077218ce5cce8f83c820f 100644 --- a/crawl.py +++ b/crawl.py @@ -15,21 +15,6 @@ import selenium from selenium import webdriver -#display = Display(visible=0, size=(1024, 800)) -#display.start() - - -chrome_options = webdriver.ChromeOptions() -chrome_options.add_argument('--no-sandbox') -chrome_options.add_argument('--headless') -chrome_options.add_argument('--disable-gpu') -#driver = webdriver.Chrome(chrome_options=chrome_options) -driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver',chrome_options=chrome_options) - -driver.implicitly_wait(20) - -from selenium.common.exceptions import NoSuchElementException - import pandas as pd import pycld2 as cld2 @@ -117,7 +102,7 @@ def collect_hosted_files(url): ''' Used for scholar ''' - print(url) + #print(url) try: crude_html = denver_to_text(url) except: @@ -139,26 +124,19 @@ def collect_hosted_files(url): links.append(check_out) return links + + + def collect_pubs(url): ''' Used for scholar ''' - driver = webdriver.Firefox() + from scrape import get_driver + driver = get_driver() + driver.get(url) crude_html = driver.page_source - """ - #print(url) - try: - crude_html = denver_to_text(url) - except: - if type(url) is type(str()): - print(url) - driver.get(url) - else: - return None - - print(crude_html) - """ + soup = BeautifulSoup(crude_html, 'html.parser') links = [] for link in soup.findAll('a', attrs={'href': re.compile("https://")}): diff --git a/gecko_install.sh b/gecko_install.sh new file mode 100644 index 0000000000000000000000000000000000000000..c3ee8c07c03bc60114e579870864dee428495ec8 --- /dev/null +++ b/gecko_install.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# download and install latest geckodriver for linux or mac. +# required for selenium to drive a firefox browser. + +install_dir="/usr/local/bin" +json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) +if [[ $(uname) == "Darwin" ]]; then + url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))') +elif [[ $(uname) == "Linux" ]]; then + url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))') +else + echo "can't determine OS" + exit 1 +fi +curl -s -L "$url" | tar -xz +chmod +x geckodriver +sudo mv geckodriver "$install_dir" +echo "installed geckodriver binary in $install_dir" diff --git a/get_bmark_corpus.py b/get_bmark_corpus.py new file mode 100644 index 0000000000000000000000000000000000000000..bdde735d14dab8081a9e69bbaea8688f8eac75ff --- /dev/null +++ b/get_bmark_corpus.py @@ -0,0 +1,142 @@ +import os +import os.path +import pickle + +import dask.bag as db +import numpy as np +import requests +from bs4 import BeautifulSoup + +from crawl import collect_pubs, convert_pdf_to_txt#,process +from scrape import get_driver +from t_analysis import text_proc +from utils import black_string + +def process(link): + urlDat = {} + urlDat['link'] = link + urlDat['page_rank'] = 'benchmark' + if str('pdf') not in link: + + driver = get_driver() + + driver.get(link) + crude_html = driver.page_source + + soup = BeautifulSoup(crude_html, 'html.parser') + for script in soup(["script", "style"]): + script.extract() # rip it out + text = soup.get_text() + #wt = copy.copy(text) + #organize text + lines = (line.strip() for line in text.splitlines()) # break into lines and remove leading and trailing space on each + chunks = (phrase.strip() for line in lines for phrase in line.split(" ")) # break multi-headlines into a line each + text = '\n'.join(chunk for chunk in chunks if chunk) # drop blank lines + buffered = str(text) + else: + pdf_file = requests.get(link, stream=True) + buffered = convert_pdf_to_txt(pdf_file) + urlDat = text_proc(buffered,urlDat) + return urlDat + +#try: +# assert os.path.isfile('../BenchmarkCorpus/benchmarks.p') +# with open('../BenchmarkCorpus/benchmarks.p','rb') as f: +# urlDats = pickle.load(f) +#except: + +def mess_length(word_length,bcm): + with open('bcm.p','rb') as f: + big_complex_mess = pickle.load(big_complex_mess,f) + reduced = big_complex_mess[0:word_length] + urlDat = {} + pmegmess = text_proc(reduced,urlDat) + return mess_length, pmegmess +""" +def get_greg_nicholas(): + urlDat = {} + urlDat['link'] = "nicholas" + urlDat['page_rank'] = 'nicholas' + #pdf_file = requests.get(link, stream=True) + #bufferd = convert_pdf_to_txt(pdf_file) + #File_object = open(r"local_text.txt","Access_Mode") + file1 = open("local_text.txt","r") + txt = file1.readlines() + new_str = '' + for i in txt: + new_str+=str(i) + urlDat = text_proc(new_str,urlDat) + print(urlDat) + #add to benchmarks + with open('benchmarks.p','rb') as f: + urlDats = pickle.load(f) + urlDats.append(urlDat) + with open('benchmarks.p','wb') as f: + pickle.dump(urlDats,f) + + return urlDat +""" + +def get_bmarks(): + xkcd_self_sufficient = str('http://splasho.com/upgoer5/library.php') + high_standard = str('https://elifesciences.org/download/aHR0cHM6Ly9jZG4uZWxpZmVzY2llbmNlcy5vcmcvYXJ0aWNsZXMvMjc3MjUvZWxpZmUtMjc3MjUtdjIucGRm/elife-27725-v2.pdf?_hash=WA%2Fey48HnQ4FpVd6bc0xCTZPXjE5ralhFP2TaMBMp1c%3D') + the_science_of_writing = str('https://cseweb.ucsd.edu/~swanson/papers/science-of-writing.pdf') + pmeg = str('http://www.elsewhere.org/pomo/') # Note this is so obfuscated, even the english language classifier rejects it. + this_manuscript = str('https://www.overleaf.com/read/dqkttvmqjvhn') + this_readme = str('https://github.com/russelljjarvis/ScienceAccessibility') + links = [xkcd_self_sufficient,high_standard,the_science_of_writing,this_manuscript,this_readme ] + urlDats = list(map(process,links)) + + pmegs = [] + for i in range(0,9): + p = process(pmeg) + if p is not None: + pmegs.append(p) # grab this constantly changing page 10 times to get the mean value. + if pmegs[0] is not None: + urlDats.append(process(pmegs[0])) + big_complex_mess = '' + urlDat = {} + for p in pmegs: + if p is not None: + for s in p['tokens']: + big_complex_mess += s+str(' ') + bcm = '' + for p in pmegs[0:2]: + if p is not None: + for s in p['tokens']: + bcm += s+str(' ') + + pmegmess_2 = text_proc(bcm,urlDat) + #import pdb; pdb.set_trace() + with open('bcm.p','wb') as f: + pickle.dump(big_complex_mess,f) + + urlDats[-1]['standard'] = np.mean([p['standard'] for p in pmegs]) + #import pdb + #pdb.set_trace() + urlDats[-1]['sp'] = np.mean([p['sp'] for p in pmegs]) + urlDats[-1]['gf'] = np.mean([p['gf'] for p in pmegs]) + with open('benchmarks.p','wb') as f: + pickle.dump(urlDats,f) + + return urlDats + + +def check_self_contained(file_name): + royal = '../BenchmarkCorpus/' +str(file_name) + klpdr = open(royal) + strText = klpdr.read() + urlDat = {'link':'local_resource_royal'} + klpdfr = text_proc(strText,urlDat, WORD_LIM = 100) + return klpdfr + + +def getText(filename): + # convert docx files. + # https://stackoverflow.com/questions/44741226/converting-docx-to-pure-text + doc = docx.Document(filename) + fullText = [] + for para in doc.paragraphs: + txt = para.text.encode('ascii', 'ignore') + fullText.append(txt) + return '\n'.join(fullText) diff --git a/install.sh b/install.sh index 4ce6fee93536930d1c61576db1a1695e7c27f881..296a8fe809c6a06072cc6ef5bbb3390639ca75e1 100644 --- a/install.sh +++ b/install.sh @@ -1,55 +1,46 @@ -# https://gist.github.com/mikesmullin/2636776 -# #!/bin/bash -# download and install latest geckodriver for linux or mac. -# required for selenium to drive a firefox browser. - -install_dir="/usr/local/bin" -json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest) +# https://gist.github.com/mikesmullin/2636776 if [[ $(uname) == "Darwin" ]]; then - url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))') + which -s brew + if [[ $? != 0 ]] ; then + # Install Homebrew + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + else + brew update + fi + brew install jq + brew install wget + brew cask install firefox + brew install python-lxml + # brew install chromium-chromedriver + curl -s -L https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p + curl -s -L https://www.dropbox.com/s/crarli3772rf3lj/more_authors_results.p?dl=0 + curl -s -L https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0 + elif [[ $(uname) == "Linux" ]]; then - url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))') + sudo apt-get update + sudo apt-get install jq wget firefox + sudo apt-get install python-lxml + sudo apt-get install -y firefox + wget https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p?dl=0 + wget https://www.dropbox.com/s/crarli3772rf3lj/more_authors_results.p?dl=0 + wget https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0 + else echo "can't determine OS" exit 1 fi -curl -s -L "$url" | tar -xz -chmod +x geckodriver -sudo mv geckodriver "$install_dir" -echo "installed geckodriver binary in $install_dir" +which -s python3 +if [[ $? != 0 ]] ; then + sudo bash install_python3.sh +fi +sudo bash gecko_install.sh +sudo python3 align_data_sources.py +sudo pip install --upgrade pip +sudo python -m pip install -U pip +sudo python3 -m pip install -r requirements.txt +sudo python3 -m pip install seaborn bs4 natsort dask plotly +sudo python3 -c "import nltk; nltk.download('punkt')" +sudo python3 -c "import nltk; nltk.download('stopwords')" -#!/bin/bash -# download and install latest chromedriver for linux or mac. -# required for selenium to drive a Chrome browser. - -install_dir="/usr/local/bin" -version=$(curl -s -L -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE) -if [[ $(uname) == "Darwin" ]]; then - url=http://chromedriver.storage.googleapis.com/$version/chromedriver_mac32.zip - curl -s -L "$url" | tar -xz - #url=https://chromedriver.storage.googleapis.com/$version/chromedriver_mac64.zip -#elif [[ $(uname) == "Linux" ]]; then -# url=https://chromedriver.storage.googleapis.com/$version/chromedriver_linux64.zip -#else -# echo "can't determine OS" -# exit 1 -#fi -curl -s -L "$url" | tar -xz -chmod +x chromedriver -sudo mv chromedriver "$install_dir" -echo "installed chromedriver binary in $install_dir" -sudo pip install PyPDF2 -sudo pip install pycld2 -sudo pip install nltk -sudo pip install selenium -sudo pip install delver -sudo pip install pdfminer -sudo pip install pyvirtualdisplay -sudo pip install textstat -sudo pip install fsspec>=0.3.3 -sudo pip install textblob -sudo pip install twython -python3 -c "import nltk;nltk.download('punkt')" -python3 -c "nltk.download('stopwords')" diff --git a/install_python3.sh b/install_python3.sh new file mode 100644 index 0000000000000000000000000000000000000000..5a1e89b82b023d69f03d85140f78aa5accb31351 --- /dev/null +++ b/install_python3.sh @@ -0,0 +1,13 @@ + + + + +wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; +bash miniconda.sh -b -p $HOME/miniconda +export PATH="$HOME/miniconda/bin:$PATH" +hash -r +conda config --set always_yes yes --set changeps1 no +conda update -q conda +conda info -a +pip install -U pip + diff --git a/more_authors_results.p b/more_authors_results.p new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/nltk.txt b/nltk.txt new file mode 100644 index 0000000000000000000000000000000000000000..a9f16429803a0c9bfb6aa4a86a97526360ee4dd9 --- /dev/null +++ b/nltk.txt @@ -0,0 +1,2 @@ +punkt +stopwords diff --git a/old/ScienceAccessibility.html b/old/ScienceAccessibility.html deleted file mode 100644 index 27c6bc4d3c841518be05690c7d06b50272bb08fd..0000000000000000000000000000000000000000 --- a/old/ScienceAccessibility.html +++ /dev/null @@ -1,1117 +0,0 @@ - -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <link rel="dns-prefetch" href="https://github.githubassets.com"> - <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com"> - <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com"> - <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com"> - <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com"> - <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> - <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> - - - - <link crossorigin="anonymous" media="all" integrity="sha512-pWLt6abkYhNeAHaDrPVG0yXCtIGRuCkwSUqQpsyN6smAIpIt+Iuq2IZKmoH9l3Cy/9ZnjvVrFZnvFFjGiqE3EA==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-a3b8a10d4a9e37a78f033ef4a4f525f5.css" /> - <link crossorigin="anonymous" media="all" integrity="sha512-lxoNv8sYf0v60l/njghefEOnv/T2aWWp6uW5CQilREiZr6G+BJoecEsTJuWzky633nPpLVHLSJAMs/+dxc3pTQ==" rel="stylesheet" href="https://github.githubassets.com/assets/github-24f342ca0a1c8da582f6949f23c967d3.css" /> - - - <link crossorigin="anonymous" media="all" integrity="sha512-N5cRdPCXHO5wgAMNwip0pdEIY0qHrTsCnrGLSLxLiQ8TVr0Mi2xZjL6/CzD3LakUjPrFHc06OU5i0jEQ8hCwJA==" rel="stylesheet" href="https://github.githubassets.com/assets/site-bdd55e67f0ed3e8974c7c941589e8c6a.css" /> - - - - <meta name="viewport" content="width=device-width"> - - <title>GitHub - russelljjarvis/ScienceAccessibility: Analysis of accessibility of science writing.</title> - <meta name="description" content="Analysis of accessibility of science writing. Contribute to russelljjarvis/ScienceAccessibility development by creating an account on GitHub."> - <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> - <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> - <meta property="fb:app_id" content="1401488693436528"> - - - <meta property="og:image" content="https://avatars2.githubusercontent.com/u/7786645?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="russelljjarvis/ScienceAccessibility" /><meta property="og:url" content="https://github.com/russelljjarvis/ScienceAccessibility" /><meta property="og:description" content="Analysis of accessibility of science writing. Contribute to russelljjarvis/ScienceAccessibility development by creating an account on GitHub." /> - - <link rel="assets" href="https://github.githubassets.com/"> - - <meta name="pjax-timeout" content="1000"> - - <meta name="request-id" content="6100:299C:3AD39:624BF:5C53A1B8" data-pjax-transient> - - - - - <meta name="selected-link" value="repo_source" data-pjax-transient> - - <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> - <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> - <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> - - <meta name="octolytics-host" content="collector.githubapp.com" /><meta name="octolytics-app-id" content="github" /><meta name="octolytics-event-url" content="https://collector.githubapp.com/github-external/browser_event" /><meta name="octolytics-dimension-request_id" content="6100:299C:3AD39:624BF:5C53A1B8" /><meta name="octolytics-dimension-region_edge" content="iad" /><meta name="octolytics-dimension-region_render" content="iad" /> -<meta name="analytics-location" content="/<user-name>/<repo-name>" data-pjax-transient="true" /> - - - - <meta name="google-analytics" content="UA-3769691-2"> - - -<meta class="js-ga-set" name="dimension1" content="Logged Out"> - - - - - - <meta name="hostname" content="github.com"> - <meta name="user-login" content=""> - - <meta name="expected-hostname" content="github.com"> - <meta name="js-proxy-site-detection-payload" content="ODA2OTVhYjc2OTNkYjhmYTM0ZjQ5YzFiMTdiNmYxYjQwOTUyMWQxYmZhOWRlNmY5YmQ2NGNmNzllNTY4ZWQ5ZXx7InJlbW90ZV9hZGRyZXNzIjoiNjUuMTAxLjcuMTkiLCJyZXF1ZXN0X2lkIjoiNjEwMDoyOTlDOjNBRDM5OjYyNEJGOjVDNTNBMUI4IiwidGltZXN0YW1wIjoxNTQ4OTg0NzYxLCJob3N0IjoiZ2l0aHViLmNvbSJ9"> - - <meta name="enabled-features" content="UNIVERSE_BANNER,MARKETPLACE_PLAN_RESTRICTION_EDITOR"> - - <meta name="html-safe-nonce" content="a9bb9f8e24a452373377611cb0950336763264b7"> - - <meta http-equiv="x-pjax-version" content="dca17098f39026bd0b8e0683fcebe586"> - - - <link href="https://github.com/russelljjarvis/ScienceAccessibility/commits/dev.atom" rel="alternate" title="Recent Commits to ScienceAccessibility:dev" type="application/atom+xml"> - - <meta name="go-import" content="github.com/russelljjarvis/ScienceAccessibility git https://github.com/russelljjarvis/ScienceAccessibility.git"> - - <meta name="octolytics-dimension-user_id" content="7786645" /><meta name="octolytics-dimension-user_login" content="russelljjarvis" /><meta name="octolytics-dimension-repository_id" content="126564171" /><meta name="octolytics-dimension-repository_nwo" content="russelljjarvis/ScienceAccessibility" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="126564171" /><meta name="octolytics-dimension-repository_network_root_nwo" content="russelljjarvis/ScienceAccessibility" /><meta name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" content="false" /> - - - <link rel="canonical" href="https://github.com/russelljjarvis/ScienceAccessibility" data-pjax-transient> - - - <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> - - <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> - - <link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> - <link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://github.githubassets.com/favicon.ico"> - -<meta name="theme-color" content="#1e2327"> - - - - <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials"> - - </head> - - <body class="logged-out env-production"> - - - <div class="position-relative js-header-wrapper "> - <a href="#start-of-content" tabindex="1" class="px-2 py-4 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a> - <div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div> - - - - - - - -<header class="Header header-logged-out position-relative f4 py-3" role="banner"> - <div class="container-lg d-flex px-3"> - <div class="d-flex flex-justify-between flex-items-center"> - <a class="mr-4" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark"> - <svg height="32" class="octicon octicon-mark-github text-white" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg> - </a> - </div> - - <div class="HeaderMenu HeaderMenu--logged-out d-flex flex-justify-between flex-items-center flex-auto"> - <div class="d-none"> - <button class="btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false"> - <svg height="24" class="octicon octicon-x text-gray" viewBox="0 0 12 16" version="1.1" width="18" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg> - </button> - </div> - - <nav class="mt-0" aria-label="Global"> - <ul class="d-flex list-style-none"> - <li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center "> - <details class="HeaderMenu-details details-overlay details-reset width-full"> - <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block"> - Why GitHub? - <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative"> - <path d="M1,1l6.2,6L13,1"></path> - </svg> - </summary> - <div class="dropdown-menu flex-auto rounded-1 bg-white px-0 mt-0 p-4 left-n4 position-absolute"> - <a href="/features" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Features <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a> - <ul class="list-style-none f5 pb-3"> - <li class="edge-item-fix"><a href="/features/code-review/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code review">Code review</a></li> - <li class="edge-item-fix"><a href="/features/project-management/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Project management">Project management</a></li> - <li class="edge-item-fix"><a href="/features/integrations" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Integrations">Integrations</a></li> - <li class="edge-item-fix"><a href="/features/actions" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Actions">Actions</a> - <li class="edge-item-fix"><a href="/features#team-management" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Team management">Team management</a></li> - <li class="edge-item-fix"><a href="/features#social-coding" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Social coding">Social coding</a></li> - <li class="edge-item-fix"><a href="/features#documentation" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Documentation">Documentation</a></li> - <li class="edge-item-fix"><a href="/features#code-hosting" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code hosting">Code hosting</a></li> - </ul> - - <ul class="list-style-none mb-0 border-lg-top pt-lg-3"> - <li class="edge-item-fix"><a href="/case-studies" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Case studies">Case Studies <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li> - <li class="edge-item-fix"><a href="/security" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Security">Security <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li> - </ul> - </div> - </details> - </li> - <li class=" mr-3 mr-lg-3"> - <a href="/enterprise" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, click, go to Enterprise">Enterprise</a> - </li> - - <li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center "> - <details class="HeaderMenu-details details-overlay details-reset width-full"> - <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block"> - Explore - <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative"> - <path d="M1,1l6.2,6L13,1"></path> - </svg> - </summary> - - <div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-0 mt-0 p-4 left-n4 position-absolute"> - <ul class="list-style-none mb-3"> - <li class="edge-item-fix"><a href="/explore" class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Explore GitHub <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li> - </ul> - - <h4 class="text-gray-light text-normal text-mono f5 mb-2 border-top pt-3">Learn & contribute</h4> - <ul class="list-style-none mb-3"> - <li class="edge-item-fix"><a href="/topics" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Topics">Topics</a></li> - <li class="edge-item-fix"><a href="/collections" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Collections">Collections</a></li> - <li class="edge-item-fix"><a href="/trending" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Trending">Trending</a></li> - <li class="edge-item-fix"><a href="https://lab.github.com/" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Learning lab">Learning Lab</a></li> - <li class="edge-item-fix"><a href="https://opensource.guide" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Open source guides">Open source guides</a></li> - </ul> - - <h4 class="text-gray-light text-normal text-mono f5 mb-2 border-top pt-3">Connect with others</h4> - <ul class="list-style-none mb-0"> - <li class="edge-item-fix"><a href="/events" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Events">Events</a></li> - <li class="edge-item-fix"><a href="https://github.community" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Community forum">Community forum</a></li> - <li class="edge-item-fix"><a href="https://education.github.com" class="py-2 pb-0 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to GitHub Education">GitHub Education</a></li> - </ul> - </div> - </details> - </li> - - <li class=" mr-3 mr-lg-3"> - <a href="/marketplace" class="HeaderMenu-link no-underline py-3 d-block d-lg-inline-block" data-ga-click="(Logged out) Header, go to Marketplace">Marketplace</a> - </li> - - <li class=" mr-3 mr-lg-3 edge-item-fix position-relative flex-wrap flex-justify-between d-flex flex-items-center "> - <details class="HeaderMenu-details details-overlay details-reset width-full"> - <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-inline-block"> - Pricing - <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-relative"> - <path d="M1,1l6.2,6L13,1"></path> - </svg> - </summary> - - <div class="dropdown-menu flex-auto rounded-1 bg-white px-0 pt-2 pb-4 mt-0 p-4 left-n4 position-absolute"> - <a href="/pricing" class="pb-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Pricing">Plans <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a> - - <ul class="list-style-none mb-3"> - <li class="edge-item-fix"><a href="/pricing#feature-comparison" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Compare features">Compare plans</a></li> - <li class="edge-item-fix"><a href="https://enterprise.github.com/contact" class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Compare features">Contact Sales</a></li> - </ul> - - <ul class="list-style-none mb-0 border-top pt-3"> - <li class="edge-item-fix"><a href="/nonprofit" class="py-2 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Nonprofits">Nonprofit <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li> - <li class="edge-item-fix"><a href="https://education.github.com" class="py-2 pb-0 lh-condensed-ultra d-block no-underline link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Education">Education <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a></li> - </ul> - </div> - </details> - </li> - </ul> - </nav> - - <div class="d-flex flex-items-center px-0 text-center text-left"> - <div class="d-lg-flex mr-3"> - <div class="header-search scoped-search site-scoped-search js-site-search position-relative js-jump-to" - role="combobox" - aria-owns="jump-to-results" - aria-label="Search or jump to" - aria-haspopup="listbox" - aria-expanded="false" -> - <div class="position-relative"> - <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="126564171" data-scoped-search-url="/russelljjarvis/ScienceAccessibility/search" data-unscoped-search-url="/search" action="/russelljjarvis/ScienceAccessibility/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="✓" /> - <label class="form-control header-search-wrapper header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center js-chromeless-input-container"> - <input type="text" - class="form-control header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable" - data-hotkey="s,/" - name="q" - value="" - placeholder="Search" - data-unscoped-placeholder="Search GitHub" - data-scoped-placeholder="Search" - autocapitalize="off" - aria-autocomplete="list" - aria-controls="jump-to-results" - aria-label="Search" - data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations#csrf-token=jCGiRDQFlgDS4cjSNUeXVpJvh8C5I4kHb66RmcbEojSas9uYoAxQqN83MwRUQ7CJkNEWRYb8AntqKMmpQK0rDQ==" - spellcheck="false" - autocomplete="off" - > - <input type="hidden" class="js-site-search-type-field" name="type" > - <img src="https://github.githubassets.com/images/search-key-slash.svg" alt="" class="mr-2 header-search-key-slash"> - - <div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container"> - -<ul class="d-none js-jump-to-suggestions-template-container"> - - -<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option"> - <a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href=""> - <div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> - <svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg> - <svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg> - <svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg> - </div> - - <img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> - - <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> - </div> - - <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> - <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> - In this repository - </span> - <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> - All GitHub - </span> - <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - - <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> - Jump to - <span class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - </a> -</li> - -</ul> - -<ul class="d-none js-jump-to-no-results-template-container"> - <li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2"> - <span class="text-gray">No suggested jump to results</span> - </li> -</ul> - -<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container"> - - -<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option"> - <a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href=""> - <div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> - <svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg> - <svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg> - <svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg> - </div> - - <img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> - - <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> - </div> - - <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> - <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> - In this repository - </span> - <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> - All GitHub - </span> - <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - - <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> - Jump to - <span class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - </a> -</li> - - - -<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option"> - <a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href=""> - <div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> - <svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 12 16" version="1.1" role="img"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg> - <svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 15 16" version="1.1" role="img"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg> - <svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M15.7 13.3l-3.81-3.83A5.93 5.93 0 0 0 13 6c0-3.31-2.69-6-6-6S1 2.69 1 6s2.69 6 6 6c1.3 0 2.48-.41 3.47-1.11l3.83 3.81c.19.2.45.3.7.3.25 0 .52-.09.7-.3a.996.996 0 0 0 0-1.41v.01zM7 10.7c-2.59 0-4.7-2.11-4.7-4.7 0-2.59 2.11-4.7 4.7-4.7 2.59 0 4.7 2.11 4.7 4.7 0 2.59-2.11 4.7-4.7 4.7z"/></svg> - </div> - - <img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28"> - - <div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> - </div> - - <div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search"> - <span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository"> - In this repository - </span> - <span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub"> - All GitHub - </span> - <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - - <div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> - Jump to - <span class="d-inline-block ml-1 v-align-middle">↵</span> - </div> - </a> -</li> - - -</ul> - - </div> - </label> -</form> </div> -</div> - - </div> - - <a class="HeaderMenu-link no-underline mr-3" href="/login?return_to=%2Frusselljjarvis%2FScienceAccessibility%3Ffbclid%3DIwAR1tzPooQTJgfqT9KcG_NK5_CCwYuvjdcmxqgtxJd46gzvwrfODLYrNyoeU" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a> - <a class="HeaderMenu-link d-inline-block no-underline border border-gray-dark rounded-1 px-2 py-1" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a> - </div> - </div> - </div> -</header> - - </div> - - <div id="start-of-content" class="show-on-focus"></div> - - <div id="js-flash-container"> - -</div> - - - - <div role="main" class="application-main " data-commit-hovercards-enabled> - <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> - <div id="js-repo-pjax-container" data-pjax-container > - - - - - - - - <div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav "> - <div class="repohead-details-container clearfix container"> - - <ul class="pagehead-actions"> - <li> - <a href="/login?return_to=%2Frusselljjarvis%2FScienceAccessibility" - class="btn btn-sm btn-with-count tooltipped tooltipped-s" - aria-label="You must be signed in to watch a repository" rel="nofollow"> - <svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg> - Watch - </a> - <a class="social-count" href="/russelljjarvis/ScienceAccessibility/watchers" - aria-label="1 user is watching this repository"> - 1 - </a> - - </li> - - <li> - <a href="/login?return_to=%2Frusselljjarvis%2FScienceAccessibility" - class="btn btn-sm btn-with-count tooltipped tooltipped-s" - aria-label="You must be signed in to star a repository" rel="nofollow"> - <svg class="octicon octicon-star v-align-text-bottom" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/></svg> - Star - </a> - - <a class="social-count js-social-count" href="/russelljjarvis/ScienceAccessibility/stargazers" - aria-label="1 user starred this repository"> - 1 - </a> - - </li> - - <li> - <a href="/login?return_to=%2Frusselljjarvis%2FScienceAccessibility" - class="btn btn-sm btn-with-count tooltipped tooltipped-s" - aria-label="You must be signed in to fork a repository" rel="nofollow"> - <svg class="octicon octicon-repo-forked v-align-text-bottom" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg> - Fork - </a> - - <a href="/russelljjarvis/ScienceAccessibility/network/members" class="social-count" - aria-label="0 users forked this repository"> - 0 - </a> - </li> -</ul> - - <h1 class="public "> - <svg class="octicon octicon-repo" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9H3V8h1v1zm0-3H3v1h1V6zm0-2H3v1h1V4zm0-2H3v1h1V2zm8-1v12c0 .55-.45 1-1 1H6v2l-1.5-1.5L3 16v-2H1c-.55 0-1-.45-1-1V1c0-.55.45-1 1-1h10c.55 0 1 .45 1 1zm-1 10H1v2h2v-1h3v1h5v-2zm0-10H2v9h9V1z"/></svg> - <span class="author" itemprop="author"><a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=7786645" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/russelljjarvis">russelljjarvis</a></span><!-- ---><span class="path-divider">/</span><!-- ---><strong itemprop="name"><a data-pjax="#js-repo-pjax-container" href="/russelljjarvis/ScienceAccessibility">ScienceAccessibility</a></strong> - -</h1> - - </div> - -<nav class="reponav js-repo-nav js-sidenav-container-pjax container" - itemscope - itemtype="http://schema.org/BreadcrumbList" - aria-label="Repository" - data-pjax="#js-repo-pjax-container"> - - <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"> - <a class="js-selected-navigation-item selected reponav-item" itemprop="url" data-hotkey="g c" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages /russelljjarvis/ScienceAccessibility" href="/russelljjarvis/ScienceAccessibility"> - <svg class="octicon octicon-code" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg> - <span itemprop="name">Code</span> - <meta itemprop="position" content="1"> -</a> </span> - - <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"> - <a itemprop="url" data-hotkey="g i" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /russelljjarvis/ScienceAccessibility/issues" href="/russelljjarvis/ScienceAccessibility/issues"> - <svg class="octicon octicon-issue-opened" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/></svg> - <span itemprop="name">Issues</span> - <span class="Counter">4</span> - <meta itemprop="position" content="2"> -</a> </span> - - <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement"> - <a data-hotkey="g p" itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /russelljjarvis/ScienceAccessibility/pulls" href="/russelljjarvis/ScienceAccessibility/pulls"> - <svg class="octicon octicon-git-pull-request" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg> - <span itemprop="name">Pull requests</span> - <span class="Counter">0</span> - <meta itemprop="position" content="3"> -</a> </span> - - - <a data-hotkey="g b" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /russelljjarvis/ScienceAccessibility/projects" href="/russelljjarvis/ScienceAccessibility/projects"> - <svg class="octicon octicon-project" viewBox="0 0 15 16" version="1.1" width="15" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg> - Projects - <span class="Counter" >0</span> -</a> - - - <a class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors dependency_graph pulse alerts security people /russelljjarvis/ScienceAccessibility/pulse" href="/russelljjarvis/ScienceAccessibility/pulse"> - <svg class="octicon octicon-graph" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg> - Insights -</a> - -</nav> - - - </div> - -<div class="container new-discussion-timeline experiment-repo-nav "> - <div class="repository-content "> - - - - <div class="signup-prompt-bg rounded-1"> - <div class="signup-prompt p-4 text-center mb-4 rounded-1"> - <div class="position-relative"> - <!-- '"` --><!-- </textarea></xmp> --></option></form><form action="/site/dismiss_signup_prompt" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="C5oOOY9hD2+v9kLS+ep0s5D3wZmxQ16kET06mnsa1IZKd31nqddqRgbo/8bCPGXdSemjOrlR9EREpHFKq5PGrA==" /> - <button type="submit" class="position-absolute top-0 right-0 btn-link link-gray" data-ga-click="(Logged out) Sign up prompt, clicked Dismiss, text:dismiss"> - Dismiss - </button> -</form> <h3 class="pt-2">Join GitHub today</h3> - <p class="col-6 mx-auto">GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.</p> - <a class="btn btn-primary" href="/join?source=prompt-code" data-ga-click="(Logged out) Sign up prompt, clicked Sign up, text:sign-up">Sign up</a> - </div> - </div> - </div> - - - <div class="mb-3"> <div class="f4"> - <span class="text-gray-dark mr-2" itemprop="about"> - Analysis of accessibility of science writing. - </span> - </div> -</div> - - - - - <div class="overall-summary overall-summary-bottomless"> - <div class="stats-switcher-viewport js-stats-switcher-viewport"> - <div class="stats-switcher-wrapper"> - <ul class="numbers-summary"> - <li class="commits"> - <a data-pjax href="/russelljjarvis/ScienceAccessibility/commits/dev"> - <svg class="octicon octicon-history" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 13H6V6h5v2H8v5zM7 1C4.81 1 2.87 2.02 1.59 3.59L0 2v4h4L2.5 4.5C3.55 3.17 5.17 2.3 7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-.34.03-.67.09-1H.08C.03 7.33 0 7.66 0 8c0 3.86 3.14 7 7 7s7-3.14 7-7-3.14-7-7-7z"/></svg> - <span class="num text-emphasized"> - 403 - </span> - commits - </a> - </li> - <li> - <a data-pjax href="/russelljjarvis/ScienceAccessibility/branches"> - <svg class="octicon octicon-git-branch" viewBox="0 0 10 16" version="1.1" width="10" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10 5c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v.3c-.02.52-.23.98-.63 1.38-.4.4-.86.61-1.38.63-.83.02-1.48.16-2 .45V4.72a1.993 1.993 0 0 0-1-3.72C.88 1 0 1.89 0 3a2 2 0 0 0 1 1.72v6.56c-.59.35-1 .99-1 1.72 0 1.11.89 2 2 2 1.11 0 2-.89 2-2 0-.53-.2-1-.53-1.36.09-.06.48-.41.59-.47.25-.11.56-.17.94-.17 1.05-.05 1.95-.45 2.75-1.25S8.95 7.77 9 6.73h-.02C9.59 6.37 10 5.73 10 5zM2 1.8c.66 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2C1.35 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2zm0 12.41c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm6-8c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg> - <span class="num text-emphasized"> - 2 - </span> - branches - </a> - </li> - - <li> - <a href="/russelljjarvis/ScienceAccessibility/releases"> - <svg class="octicon octicon-tag" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.73 1.73C7.26 1.26 6.62 1 5.96 1H3.5C2.13 1 1 2.13 1 3.5v2.47c0 .66.27 1.3.73 1.77l6.06 6.06c.39.39 1.02.39 1.41 0l4.59-4.59a.996.996 0 0 0 0-1.41L7.73 1.73zM2.38 7.09c-.31-.3-.47-.7-.47-1.13V3.5c0-.88.72-1.59 1.59-1.59h2.47c.42 0 .83.16 1.13.47l6.14 6.13-4.73 4.73-6.13-6.15zM3.01 3h2v2H3V3h.01z"/></svg> - <span class="num text-emphasized"> - 0 - </span> - releases - </a> - </li> - - - <li> - <a href="/russelljjarvis/ScienceAccessibility/graphs/contributors"> - <svg class="octicon octicon-organization" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M16 12.999c0 .439-.45 1-1 1H7.995c-.539 0-.994-.447-.995-.999H1c-.54 0-1-.561-1-1 0-2.634 3-4 3-4s.229-.409 0-1c-.841-.621-1.058-.59-1-3 .058-2.419 1.367-3 2.5-3s2.442.58 2.5 3c.058 2.41-.159 2.379-1 3-.229.59 0 1 0 1s1.549.711 2.42 2.088C9.196 9.369 10 8.999 10 8.999s.229-.409 0-1c-.841-.62-1.058-.59-1-3 .058-2.419 1.367-3 2.5-3s2.437.581 2.495 3c.059 2.41-.158 2.38-1 3-.229.59 0 1 0 1s3.005 1.366 3.005 4z"/></svg> - <span class="num text-emphasized"> - 1 - </span> - contributor -</a> - - </li> - - </ul> - - <div class="repository-lang-stats"> - <ol class="repository-lang-stats-numbers"> - <li> - <a href="/russelljjarvis/ScienceAccessibility/search?l=tex" data-ga-click="Repository, language stats search click, location:repo overview"> - <span class="color-block language-color" style="background-color:#3D6117;"></span> - <span class="lang">TeX</span> - <span class="percent">61.3%</span> - </a> - </li> - <li> - <a href="/russelljjarvis/ScienceAccessibility/search?l=python" data-ga-click="Repository, language stats search click, location:repo overview"> - <span class="color-block language-color" style="background-color:#3572A5;"></span> - <span class="lang">Python</span> - <span class="percent">34.8%</span> - </a> - </li> - <li> - <a href="/russelljjarvis/ScienceAccessibility/search?l=dockerfile" data-ga-click="Repository, language stats search click, location:repo overview"> - <span class="color-block language-color" style="background-color:#0db7ed;"></span> - <span class="lang">Dockerfile</span> - <span class="percent">3.9%</span> - </a> - </li> - </ol> - </div> - </div> - </div> - </div> - - <button type="button" class="d-flex p-0 repository-lang-stats-graph js-toggle-lang-stats" title="Click for language details" data-ga-click="Repository, language bar stats toggle, location:repo overview"> - <span class="language-color" aria-label="TeX 61.3%" style="width:61.3%; background-color:#3D6117;" itemprop="keywords">TeX</span> - <span class="language-color" aria-label="Python 34.8%" style="width:34.8%; background-color:#3572A5;" itemprop="keywords">Python</span> - <span class="language-color" aria-label="Dockerfile 3.9%" style="width:3.9%; background-color:#0db7ed;" itemprop="keywords">Dockerfile</span> - </button> - - - - - - - <div class="file-navigation in-mid-page d-flex flex-items-start"> - -<div class="select-menu branch-select-menu js-menu-container js-select-menu float-left js-load-contents" - data-contents-url="/russelljjarvis/ScienceAccessibility/ref-list/dev?source_action=disambiguate&source_controller=files"> - <button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w" - - type="button" aria-label="Switch branches or tags" aria-expanded="false" aria-haspopup="true"> - <i>Branch:</i> - <span class="js-select-button css-truncate-target">dev</span> - </button> - - <div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax> - <div class="select-menu-modal"> - <div class="js-select-menu-deferred-content"></div> - <div class="select-menu-loading-overlay anim-pulse"> - <svg height="32" class="octicon octicon-octoface" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M14.7 5.34c.13-.32.55-1.59-.13-3.31 0 0-1.05-.33-3.44 1.3-1-.28-2.07-.32-3.13-.32s-2.13.04-3.13.32c-2.39-1.64-3.44-1.3-3.44-1.3-.68 1.72-.26 2.99-.13 3.31C.49 6.21 0 7.33 0 8.69 0 13.84 3.33 15 7.98 15S16 13.84 16 8.69c0-1.36-.49-2.48-1.3-3.35zM8 14.02c-3.3 0-5.98-.15-5.98-3.35 0-.76.38-1.48 1.02-2.07 1.07-.98 2.9-.46 4.96-.46 2.07 0 3.88-.52 4.96.46.65.59 1.02 1.3 1.02 2.07 0 3.19-2.68 3.35-5.98 3.35zM5.49 9.01c-.66 0-1.2.8-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.54-1.78-1.2-1.78zm5.02 0c-.66 0-1.2.79-1.2 1.78s.54 1.79 1.2 1.79c.66 0 1.2-.8 1.2-1.79s-.53-1.78-1.2-1.78z"/></svg> - </div> - </div> - </div> -</div> - - - <button type="button" class="btn btn-sm disabled tooltipped tooltipped-n new-pull-request-btn" aria-label="You must be signed in to create a pull request"> - New pull request - </button> - - <div class="breadcrumb flex-auto"> - - </div> - - <div class="BtnGroup"> - - <a href="/russelljjarvis/ScienceAccessibility/find/dev" - class="btn btn-sm empty-icon float-right BtnGroup-item" - data-pjax - data-hotkey="t" - data-ga-click="Repository, find file, location:repo overview"> - Find file - </a> - </div> - - - <details class="get-repo-select-menu js-get-repo-select-menu position-relative details-overlay details-reset"> - <summary class="btn btn-sm btn-primary"> - Clone or download - <span class="dropdown-caret"></span> - </summary> - <div class="position-relative"> - <div class="get-repo-modal dropdown-menu dropdown-menu-sw pb-0 js-toggler-container js-get-repo-modal"> - - <div class="get-repo-modal-options"> - <div class="clone-options https-clone-options"> - - <h4 class="mb-1"> - Clone with HTTPS - <a class="muted-link" href="https://help.github.com/articles/which-remote-url-should-i-use" target="_blank" title="Which remote URL should I use?"> - <svg class="octicon octicon-question" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M6 10h2v2H6v-2zm4-3.5C10 8.64 8 9 8 9H6c0-.55.45-1 1-1h.5c.28 0 .5-.22.5-.5v-1c0-.28-.22-.5-.5-.5h-1c-.28 0-.5.22-.5.5V7H4c0-1.5 1.5-3 3-3s3 1 3 2.5zM7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7z"/></svg> - </a> - </h4> - <p class="mb-2 get-repo-decription-text"> - Use Git or checkout with SVN using the web URL. - </p> - - <div class="input-group"> - <input type="text" class="form-control input-monospace input-sm" data-autoselect value="https://github.com/russelljjarvis/ScienceAccessibility.git" aria-label="Clone this repository at https://github.com/russelljjarvis/ScienceAccessibility.git" readonly> - <div class="input-group-button"> - <clipboard-copy value="https://github.com/russelljjarvis/ScienceAccessibility.git" aria-label="Copy to clipboard" class="btn btn-sm"> - <svg class="octicon octicon-clippy" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg> - </clipboard-copy> - </div> -</div> - - </div> - - <div class="mt-2"> - -<a href="/russelljjarvis/ScienceAccessibility/archive/dev.zip" - class="btn btn-outline get-repo-btn -" - rel="nofollow" - data-ga-click="Repository, download zip, location:repo overview"> - Download ZIP -</a> - - </div> - </div> - - <div class="js-modal-download-mac py-2 px-3 d-none"> - <h4 class="lh-condensed mb-3">Launching GitHub Desktop<span class="animated-ellipsis-container"><span class="animated-ellipsis">...</span></span></h4> - <p class="text-gray">If nothing happens, <a href="https://desktop.github.com/">download GitHub Desktop</a> and try again.</p> - <p><button class="btn-link js-get-repo-modal-download-back">Go back</button></p> - </div> - - <div class="js-modal-download-windows py-2 px-3 d-none"> - <h4 class="lh-condensed mb-3">Launching GitHub Desktop<span class="animated-ellipsis-container"><span class="animated-ellipsis">...</span></span></h4> - <p class="text-gray">If nothing happens, <a href="https://desktop.github.com/">download GitHub Desktop</a> and try again.</p> - <p><button class="btn-link js-get-repo-modal-download-back">Go back</button></p> - </div> - - <div class="js-modal-download-xcode py-2 px-3 d-none"> - <h4 class="lh-condensed mb-3">Launching Xcode<span class="animated-ellipsis-container"><span class="animated-ellipsis">...</span></span></h4> - <p class="text-gray">If nothing happens, <a href="https://developer.apple.com/xcode/">download Xcode</a> and try again.</p> - <p><button class="btn-link js-get-repo-modal-download-back">Go back</button></p> - </div> - - <div class="js-modal-download-visual-studio py-2 px-3 d-none"> - <h4 class="lh-condensed mb-3">Launching Visual Studio<span class="animated-ellipsis-container"><span class="animated-ellipsis">...</span></span></h4> - <p class="text-gray">If nothing happens, <a href="https://visualstudio.github.com/">download the GitHub extension for Visual Studio</a> and try again.</p> - <p><button class="btn-link js-get-repo-modal-download-back">Go back</button></p> - </div> - - </div> - </div> -</details> - -</div> - - - - - - <div class="commit-tease js-details-container Details d-flex rounded-top-1" data-issue-and-pr-hovercards-enabled> - -<div class="AvatarStack flex-self-start "> - <div class="AvatarStack-body" aria-label="russelljjarvis"> - - <a class="avatar" data-skip-pjax="true" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=7786645" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/russelljjarvis"> - <img height="20" width="20" alt="@russelljjarvis" src="https://avatars1.githubusercontent.com/u/7786645?s=60&v=4" /> -</a> </div> -</div> - - <div class="flex-auto f6 mr-3"> - - <a href="/russelljjarvis/ScienceAccessibility/commits?author=russelljjarvis" - class="commit-author tooltipped tooltipped-s user-mention" - aria-label="View all commits by russelljjarvis">russelljjarvis</a> - - - - - - <a data-pjax="true" title="Update README.md" class="message" href="/russelljjarvis/ScienceAccessibility/commit/60df07c58acddc66bc54fa0382836f15a2403d2f">Update README.md</a> - - </div> - <div class="no-wrap"> - Latest commit - <a class="commit-tease-sha" href="/russelljjarvis/ScienceAccessibility/commit/60df07c58acddc66bc54fa0382836f15a2403d2f" data-pjax> - 60df07c - </a> - <span itemprop="dateModified"><relative-time datetime="2019-01-31T23:08:40Z">Jan 31, 2019</relative-time></span> - </div> - </div> - - - -<div class="file-wrap"> - <a class="d-none js-permalink-shortcut" data-hotkey="y" href="/russelljjarvis/ScienceAccessibility/tree/60df07c58acddc66bc54fa0382836f15a2403d2f">Permalink</a> - - <table class="files js-navigation-container js-active-navigation-container" data-pjax> - <thead> - <tr> - <th><span class="sr-only">Type</span></th> - <th><span class="sr-only">Name</span></th> - <th><span class="sr-only">Latest commit message</span></th> - <th><span class="sr-only">Commit time</span></th> - </tr> - </thead> - - - <tbody> - <tr class="warning include-fragment-error"> - <td class="icon"><svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg></td> - <td class="content" colspan="3">Failed to load latest commit information.</td> - </tr> - - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="directory" class="octicon octicon-file-directory" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"><path fill-rule="evenodd" d="M13 4H7V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM6 4H1V3h5v1z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="BenchmarkCorpus" id="7640c6e30d8df49eba57a782d525be5f-379d2d6a2d0779da35c1e0a8aaf7a4363aee1d36" href="/russelljjarvis/ScienceAccessibility/tree/dev/BenchmarkCorpus">BenchmarkCorpus</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="dev changes" class="message" href="/russelljjarvis/ScienceAccessibility/commit/185ca4c580d0b0288280c6a6c58894b484046cb0">dev changes</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2018-06-04T04:41:48Z">Jun 4, 2018</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="directory" class="octicon octicon-file-directory" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"><path fill-rule="evenodd" d="M13 4H7V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM6 4H1V3h5v1z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="CodeComplexity" id="d44c1b201c957a221f992f13d74e1a73-6f4047e3c0fc087f13337aa4dadaea33baf30b0a" href="/russelljjarvis/ScienceAccessibility/tree/dev/CodeComplexity">CodeComplexity</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="code maintance and code complexity support" class="message" href="/russelljjarvis/ScienceAccessibility/commit/e050679ab7e8ef876a448c9ef713a14db053dee5">code maintance and code complexity support</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2018-06-27T19:32:39Z">Jun 27, 2018</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="directory" class="octicon octicon-file-directory" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"><path fill-rule="evenodd" d="M13 4H7V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM6 4H1V3h5v1z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="Examples" id="ff7c0fcd6a31e735a61c001f75426961-550715de6afa67cbf6aefe8f70934a2666f4b0bb" href="/russelljjarvis/ScienceAccessibility/tree/dev/Examples">Examples</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="dev changes" class="message" href="/russelljjarvis/ScienceAccessibility/commit/f76eae8645d99c3d2f5ac5da64e9a6404fbb502a">dev changes</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-16T19:46:52Z">Jan 16, 2019</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="directory" class="octicon octicon-file-directory" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"><path fill-rule="evenodd" d="M13 4H7V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM6 4H1V3h5v1z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="Publication" id="6bd6beac1da76b2d2a9c3b7914ba034c-56e261113aacfbf5dddb60e8f8dcfaa8096b5ae0" href="/russelljjarvis/ScienceAccessibility/tree/dev/Publication">Publication</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="update writing" class="message" href="/russelljjarvis/ScienceAccessibility/commit/0d92a5fd09a19f55d289dd33b642df5f414a1511">update writing</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-30T22:25:25Z">Jan 30, 2019</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="directory" class="octicon octicon-file-directory" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img"><path fill-rule="evenodd" d="M13 4H7V3c0-.66-.31-1-1-1H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zM6 4H1V3h5v1z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="SComplexity" id="4b93e87a84236046334b7afbab648ae7-586290bb228723297df81b562eb1987ea19846a7" href="/russelljjarvis/ScienceAccessibility/tree/dev/SComplexity">SComplexity</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="dev changes" class="message" href="/russelljjarvis/ScienceAccessibility/commit/f76eae8645d99c3d2f5ac5da64e9a6404fbb502a">dev changes</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-16T19:46:52Z">Jan 16, 2019</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="file" class="octicon octicon-file" viewBox="0 0 12 16" version="1.1" width="12" height="16" role="img"><path fill-rule="evenodd" d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="Dockerfile" id="3254677a7917c6c01f55212f86c57fbf-251968208605494ffe5043c14e3ac15d0d82f1fa" href="/russelljjarvis/ScienceAccessibility/blob/dev/Dockerfile">Dockerfile</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="dev changes" class="message" href="/russelljjarvis/ScienceAccessibility/commit/f76eae8645d99c3d2f5ac5da64e9a6404fbb502a">dev changes</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-16T19:46:52Z">Jan 16, 2019</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="file" class="octicon octicon-file" viewBox="0 0 12 16" version="1.1" width="12" height="16" role="img"><path fill-rule="evenodd" d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="README.md" id="04c6e90faac2675aa89e2176d2eec7d8-bf68f4b4dac3f69ae038c7ecc3560529542b19dd" href="/russelljjarvis/ScienceAccessibility/blob/dev/README.md">README.md</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="Update README.md" class="message" href="/russelljjarvis/ScienceAccessibility/commit/60df07c58acddc66bc54fa0382836f15a2403d2f">Update README.md</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-31T23:08:40Z">Jan 31, 2019</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="file" class="octicon octicon-file" viewBox="0 0 12 16" version="1.1" width="12" height="16" role="img"><path fill-rule="evenodd" d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="build.sh" id="0b83f9dedf40d7356e5ca147a077acb4-4129082bce83d2bd903ad35da32df8a583755d04" href="/russelljjarvis/ScienceAccessibility/blob/dev/build.sh">build.sh</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="organisational changes that might temporarily break the code but will be better for maintaince, ie re-wrote the nested for loop in t_analysis_csv, to use map, broke long function into two, made a dockerfile that runs, made a build file that runs" class="message" href="/russelljjarvis/ScienceAccessibility/commit/a16958aaf219d965622338b50456f5b292e39d4a">organisational changes that might temporarily break the code but will…</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2018-05-22T19:53:25Z">May 22, 2018</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="file" class="octicon octicon-file" viewBox="0 0 12 16" version="1.1" width="12" height="16" role="img"><path fill-rule="evenodd" d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="setup.py" id="2eeaed663bd0d25b7e608891384b7298-ecee11bad46edb4d511c8ed0f99f6332520c0311" href="/russelljjarvis/ScienceAccessibility/blob/dev/setup.py">setup.py</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="python repo now installable via pip, and tournament between PIs now works" class="message" href="/russelljjarvis/ScienceAccessibility/commit/55cbb2b5beaffecad29e07be1658c182675c02be">python repo now installable via pip, and tournament between PIs now w…</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2018-05-29T22:29:24Z">May 29, 2018</time-ago></span> - </td> - </tr> - <tr class="js-navigation-item"> - <td class="icon"> - <svg aria-label="file" class="octicon octicon-file" viewBox="0 0 12 16" version="1.1" width="12" height="16" role="img"><path fill-rule="evenodd" d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg> - <img width="16" height="16" class="spinner" alt="" src="https://github.githubassets.com/images/spinners/octocat-spinner-32.gif" /> - </td> - <td class="content"> - <span class="css-truncate css-truncate-target"><a class="js-navigation-open" title="test.py" id="b284a28710cce90d9d9be3a7f4cabc8e-a482c012c257d8ba25ee89981592af5fc25dd7f4" href="/russelljjarvis/ScienceAccessibility/blob/dev/test.py">test.py</a></span> - </td> - <td class="message"> - <span class="css-truncate css-truncate-target"> - <a data-pjax="true" title="planning documents" class="message" href="/russelljjarvis/ScienceAccessibility/commit/f843ce7544a0b29221cf1c47a03863120b66dfe0">planning documents</a> - </span> - </td> - <td class="age"> - <span class="css-truncate css-truncate-target"><time-ago datetime="2019-01-11T01:24:06Z">Jan 11, 2019</time-ago></span> - </td> - </tr> - </tbody> - </table> - -</div> - - - - <div id="readme" class="Box Box--condensed instapaper_body md js-code-block-container"> - <div class="Box-header px-2 clearfix"> - <h3 class="Box-title pr-3"> - <svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"/></svg> - README.md - </h3> - </div> - <div class="Box-body p-6"> - <article class="markdown-body entry-content" itemprop="text"><h1><a id="user-content-science-accessibility-project" class="anchor" aria-hidden="true" href="#science-accessibility-project"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Science Accessibility Project</h1> -<h2><a id="user-content-overview" class="anchor" aria-hidden="true" href="#overview"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Overview</h2> -<p>Non-scientific writing typically exceeds genuine scientific writing in one important aspect: in contrast to genuine science, non-science is often expressed with a less complex, and more engaging writing style. We believe non-science writing occupies a more accessible niche, that academic science writing should also occupy. Unfortunately, writing styles intended for different audiences, are predictably different. We show that we can use machine learning to predict the status of writing styles: blog, wikipedia, opinion, and traditional science, by first sampling a large variety of web documents, and then classifying among the different writing types. By predicting which of the several different styles a document occupies, we are able to characterize among different writing niches, and to point to remedies.</p> -<p>Multiple stake holders can benefit when science is communicated with lower complexity expression of ideas. With lower complexity science writing, knowledge would be more readily transferred into public awareness, additionally, digital organization of facts derived from journal articles would occur more readily, as successful machine comprehension of documented science would likely occur with less human intervention.</p> -<p>Objectively describing the character of the different writing styles will allow us to prescribe how, to shift academic science writing into a more accessible niche, where science can more aggressively compete with pseudo-science, and blogs, at a moment in history when public awareness is critically at stake.</p> -<h2><a id="user-content-machine-estimation-of-writing-complexity" class="anchor" aria-hidden="true" href="#machine-estimation-of-writing-complexity"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Machine Estimation of Writing Complexity:</h2> -<p>The accessibility of written word can be approximated by a computer program that reads over the text, and guesses the mental difficulty, associated with comprehending a written document. The computer program maps reading difficult onto a quantity that represents the number of years of schooling needed to decode the language in the document. For convenience, we can refer to the difficulty associated with the text as the 'complexity' of the document.</p> -<h2><a id="user-content-open-data-counterpart-of-this-code-repository-lives-at" class="anchor" aria-hidden="true" href="#open-data-counterpart-of-this-code-repository-lives-at"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Open Data Counterpart of this Code Repository lives at:</h2> -<p><a href="https://osf.io/yng5u/wiki/home/" rel="nofollow">https://osf.io/yng5u/wiki/home/</a></p> -<h2><a id="user-content-analysis-of-text" class="anchor" aria-hidden="true" href="#analysis-of-text"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Analysis of Text.</h2> -<p>Running the scraper is not necessary for analysing the text documents.</p> -<h2><a id="user-content-word-clouds" class="anchor" aria-hidden="true" href="#word-clouds"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Word clouds:</h2> -<h3><a id="user-content-not-science" class="anchor" aria-hidden="true" href="#not-science"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Not Science</h3> -<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7786645/52091608-322fbe80-2572-11e9-8553-3e346a8b824e.png"><img src="https://user-images.githubusercontent.com/7786645/52091608-322fbe80-2572-11e9-8553-3e346a8b824e.png" alt="image" style="max-width:100%;"></a></p> -<h3><a id="user-content-science" class="anchor" aria-hidden="true" href="#science"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Science</h3> -<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/7786645/52091615-352aaf00-2572-11e9-905a-0b75fe0005d7.png"><img src="https://user-images.githubusercontent.com/7786645/52091615-352aaf00-2572-11e9-905a-0b75fe0005d7.png" alt="image" style="max-width:100%;"></a></p> -<h2><a id="user-content-building-all-of-the-project" class="anchor" aria-hidden="true" href="#building-all-of-the-project"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Building All of the Project.</h2> -<p>(including the scraper).</p> -<p>The scraping, and crawling code for this is dependency heavy. Docker is used to solve non trivial software dependency issues where possible.</p> -<p>If docker is installed on the base OS, git clone this repository, and assuming the file build.sh is chmod +x , run: <code>bash build.sh</code> to perform the dockerbuild. To run the jupyter notebook over docker, enter the docker enivornment interactively in one of two ways, via a bash shell, or via an ipython notebook or -and then launch python via BASH in Linux as follows:</p> -<pre><code>'cd this_path; sudo docker run -it -v this_path:/home/jovyan slc' -</code></pre> -<p>Maybe define a bash alias, if this command get's too big and old.</p> -<pre><code>alias drvt='cd this_path; sudo docker run -v this_path:/home/jovyan slc' -</code></pre> -<p>To Run the project, you need navigaate to the Examples directory and then execute: -<code>python use_scrape.py</code>, which scrapes search engines for parameters defined in that file. -Once that is done an analysis program <code>use_analysis</code> is then called to run an analysis on the scraped text. This program generates some simple figures. The figures are very basic, and they act to function only as proof of concept.</p> -<p>Given pre-existing data (pickled files consisiting of raw text contents), the analysis file can also be run on it's own by executing: <code>python use_analysis.py</code>. To analyse the scraped texts, the jupyter notebook: <code>vstrl.ipynb</code> also contains idioms for plotting and analysis based on scrapped data, although it is not maintained. The package bokeh, facilitates pretty interactive plots with data point mouse over data metrics.</p> -<p>Another file <code>Examples/use_code_complexity.py</code> reports back about the complexity of the code base. This code complexity analysis is not thorough enough to include third party modules that were heavily utilized in the analysis, however, the principle of code complexity, with an application limited scope is generally applied in our approach, as it's obviously not desirable to use obfuscated code as a tool used to advocate for simple language.</p> -<h2><a id="user-content-why-is-the-scraping-code-so-complex" class="anchor" aria-hidden="true" href="#why-is-the-scraping-code-so-complex"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Why is the Scraping Code So Complex?</h2> -<p>A lot of complexity in the code base comes from the need to masquerade as a non bot web surfer. An example of a TCP/IP dialogue might read like this: -Search Engine: 'who are you?' code: 'I am an honest human centric browser, and certainly not a robot surfing in the nude'. Search Engine: 'good, here are some pages'. Time elapses and the truth is revealed just like in 'the Emperors New Clothes'.</p> -<p>Excepting for the scraping the wikipedia (which has bot friendly policies), it's a bad idea to surf raw ie to only use: <code>urllib</code>, or <code>requests</code>, as these resource grabbers are sure fire bot give aways. -<code>Selenium</code>, <code>Google Scrape</code> (uses Selenium), and <code>delver Crawler</code>, are the surfing clothes people use; they work together to prolong a period feigned humanhood. The downloading of pdf's as opposed to html usually is fine without a fake humancentric browser (that acts like it is storing cookies), but this does not seem to cause any problems.</p> -<h2><a id="user-content-what-about-code-cognitive-complexity" class="anchor" aria-hidden="true" href="#what-about-code-cognitive-complexity"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>What about Code Cognitive Complexity?</h2> -<p>The project takes measures to minimize that also. See the codeComplexity directory.</p> -</article> - </div> - </div> - - - - </div> - <div class="modal-backdrop js-touch-events"></div> -</div> - - </div> - </div> - - </div> - - -<div class="footer container-lg px-3" role="contentinfo"> - <div class="position-relative d-flex flex-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light "> - <ul class="list-style-none d-flex flex-wrap "> - <li class="mr-3">© 2019 <span title="0.18158s from unicorn-7fd8dc6d88-bmppf">GitHub</span>, Inc.</li> - <li class="mr-3"><a data-ga-click="Footer, go to terms, text:terms" href="https://github.com/site/terms">Terms</a></li> - <li class="mr-3"><a data-ga-click="Footer, go to privacy, text:privacy" href="https://github.com/site/privacy">Privacy</a></li> - <li class="mr-3"><a data-ga-click="Footer, go to security, text:security" href="https://github.com/security">Security</a></li> - <li class="mr-3"><a href="https://githubstatus.com/" data-ga-click="Footer, go to status, text:status">Status</a></li> - <li><a data-ga-click="Footer, go to help, text:help" href="https://help.github.com">Help</a></li> - </ul> - - <a aria-label="Homepage" title="GitHub" class="footer-octicon mr-lg-4" href="https://github.com"> - <svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg> -</a> - <ul class="list-style-none d-flex flex-wrap "> - <li class="mr-3"><a data-ga-click="Footer, go to contact, text:contact" href="https://github.com/contact">Contact GitHub</a></li> - <li class="mr-3"><a href="https://github.com/pricing" data-ga-click="Footer, go to Pricing, text:Pricing">Pricing</a></li> - <li class="mr-3"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li> - <li class="mr-3"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li> - <li class="mr-3"><a href="https://github.blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li> - <li><a data-ga-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li> - - </ul> - </div> - <div class="d-flex flex-justify-center pb-6"> - <span class="f6 text-gray-light"></span> - </div> -</div> - - - - <div id="ajax-error-message" class="ajax-error-message flash flash-error"> - <svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg> - <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> - <svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg> - </button> - You can’t perform that action at this time. - </div> - - - <script crossorigin="anonymous" integrity="sha512-Mp0nAOFvmE8PVQP49TPVMbQBLb+lpf3gu9GF1CPqybGGzl/8KEKDTKzuJpxxd5xF8HUi85xKPkssLtVVdLKtlw==" type="application/javascript" src="https://github.githubassets.com/assets/compat-6e5ed2648dae3be3f9358af5732a780f.js"></script> - <script crossorigin="anonymous" integrity="sha512-jmiDi11+OpgKRxT04ET3AFjcnpo6ZRlazPlsLjkUAAhSdCfO+qJQg9TSXTHBrZFsOEzDlQvcyd8j0ej+NIyWlA==" type="application/javascript" src="https://github.githubassets.com/assets/frameworks-4da747c86010088450ec11c4e199a7da.js"></script> - - <script crossorigin="anonymous" async="async" integrity="sha512-LSCXkSSca/3AvHXcovsWK0oiIDRV/fbLwP2u9ASb2vrpvuPI4vFnY+kfPzCfvyCf1aB9svestiqjcLe/SN/A9g==" type="application/javascript" src="https://github.githubassets.com/assets/github-e040e718d11ded3882c409633cb1e497.js"></script> - - - - <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none"> - <svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"/></svg> - <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span> - <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span> - </div> - <template id="site-details-dialog"> - <details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark" open> - <summary aria-haspopup="dialog" aria-label="Close dialog"></summary> - <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast"> - <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> - <svg class="octicon octicon-x" viewBox="0 0 12 16" version="1.1" width="12" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"/></svg> - </button> - <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> - </details-dialog> - </details> -</template> - - <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> - <div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;"> - </div> -</div> - -<div id="hovercard-aria-description" class="sr-only"> - Press h to open a hovercard with more details. -</div> - - <div aria-live="polite" class="js-global-screen-reader-notice sr-only"></div> - - </body> -</html> - diff --git a/old/build.sh b/old/build.sh deleted file mode 100755 index 4129082bce83d2bd903ad35da32df8a583755d04..0000000000000000000000000000000000000000 --- a/old/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -sudo docker build -t slc . - diff --git a/old/index.html b/old/index.html deleted file mode 100644 index 8d23f9e7efbfc628d4a42b1061b677615bce18f5..0000000000000000000000000000000000000000 --- a/old/index.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - -<!DOCTYPE html> -<html lang="en"> - - <head> - - <meta charset="utf-8"> - <title>Bokeh Plot</title> - - - - - <link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css" type="text/css" /> - - - - <script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js"></script> - <script type="text/javascript"> - Bokeh.set_log_level("info"); - </script> - - - - - </head> - - - <body> - - - - - - <div class="bk-root" id="7942579f-3fe7-454a-9a79-75739fa55f07"></div> - - - - - <script type="application/json" id="d80bec96-df4e-4af9-91bb-ba6daa5f39fb"> - {"1e6effd5-2512-4bb1-8666-88153ca295e0":{"roots":{"references":[{"attributes":{"dimension":1,"plot":{"id":"5af1272b-5193-4209-9a37-6cbb308fc225","subtype":"Figure","type":"Plot"},"ticker":{"id":"3e992d6f-acf7-4869-90cc-3cf49cc1ee7a","type":"BasicTicker"}},"id":"0f45f497-5e12-4c21-a6d2-17ad63d3a0a6","type":"Grid"},{"attributes":{"callback":null,"data":{"links":["https://en.wiktionary.org/wiki/frailty","https://en.wiktionary.org/wiki/%CE%BA%CE%B1%CF%81%CE%BA%CE%AF%CE%BD%CE%BF%CF%82#Ancient_Greek","https://web.archive.org/web/20140608104550/http://www.nhs.uk/Conditions/cancer/Pages/symptoms.aspx","https://www.cancer.gov/about-cancer/treatment/types/targeted-therapies/targeted-therapies-fact-sheet","https://web.archive.org/web/20100926191037/http://seer.cancer.gov/statfacts/html/all.html","https://www.cancer.gov/about-cancer/understanding/what-is-cancer","https://web.archive.org/web/20150704154440/http://www.cancer.gov/about-cancer/causes-prevention/risk/obesity/obesity-fact-sheet#q3","https://web.archive.org/web/20170406113547/https://academic.oup.com/alcalc/article-lookup/doi/10.1093/alcalc/agv110","https://web.archive.org/web/20170712114430/http://www.searo.who.int/publications/bookstore/documents/9283204298/en/","https://web.archive.org/web/20130802043732/http://www.cancer.org/cancer/cancercauses/geneticsandcancer/heredity-and-cancer","https://web.archive.org/web/20140714120018/http://www.cancer.org/treatment/understandingyourdiagnosis/examsandtestdescriptions/testingbiopsyandcytologyspecimensforcancer/testing-biopsy-and-cytology-specimens-for-cancer-how-is-cancer-diagnosed","https://web.archive.org/web/20170712114430/http://www.searo.who.int/publications/bookstore/documents/9283204298/en/","https://web.archive.org/web/20170712114430/http://www.searo.who.int/publications/bookstore/documents/9283204298/en/","https://web.archive.org/web/20170712114430/http://www.searo.who.int/publications/bookstore/documents/9283204298/en/","https://www.cancer.gov/about-cancer/causes-prevention/risk/radiation/cell-phones-fact-sheet","https://www.merriam-webster.com/dictionary/docusoap","https://web.archive.org/web/20081204043437/http://www.thisislondon.co.uk/film/article-23369560-details/Warhol+'reality'+film+named+in+top+100/article.do","https://www.nytimes.com/2003/01/26/movies/television-radio-bachelor-no-1-and-the-birth-of-reality-tv.html","https://www.imdb.com/title/tt0088584/","https://www.usatoday.com/life/television/news/2007-10-09-real-world_N.htm","https://www.youtube.com/watch?v=BBwepkVurCI","https://www.washingtonpost.com/news/arts-and-entertainment/wp/2014/06/12/14-reality-stars-who-exist-today-because-of-the-o-j-simpson-trial/","https://www.usatoday.com/life/television/news/2007-05-07-reality-TV_N.htm?csp=34","https://en.wikipedia.org/wiki/Mount_Fuji","https://www.japan-guide.com/e/e2172.html","https://www.nationalgeographic.org/media/mount-fuji/","https://www.britannica.com/place/Mount-Fuji","https://www.tripadvisor.com/Attraction_Review-g298102-d321024-Reviews-Mount_Fuji-Chubu.html","https://wikitravel.org/en/Mount_Fuji","https://www.bing.com/aclick?ld=e3uyJivy05G_0NYaeQjAo4PzVUCUwZUqE6eaLmJJhwSK0851BpXNa4plAAsoQ2KV1ppd2125-5XUQm99n2ykK516q726GHrZgtAx_fIU1EQF6sdqVhlm0u3J5MtH-t2ud4c6-Fit4EAzXYDMFMB2C6chlCNpm94i-Jc-WMB9We6CtbhPiu&u=aHR0cHMlM2ElMmYlMmZ3d3cudmlhdG9yLmNvbSUyZlRva3lvLWF0dHJhY3Rpb25zJTJmTXQtRnVqaSUyZmQzMzQtYTg2JTNmbWNpZCUzZDMzOTUzJTI2dHNlbSUzZHRydWUlMjZzdXBjaSUzZDEyOTIwNTc4OTElMjZzdXBhZyUzZDExMTQ0NTE1MDUlMjZzdXBzYyUzZGt3ZC0xODUyNjc5MTM5NSUzYWxvYy0xOTAlMjZzdXBhaSUzZDc2NjIyMjQzNzk0OTczJTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNnN1cHRpJTNka3dkLTE4NTI2NzkxMzk1JTNhbG9jLTE5MCUyNnN1cGxwJTNkNzc5OTUlMjZzdXBsaSUzZCUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://www.bing.com/aclick?ld=e3Hticl9VqI5KKFRb0F45_wzVUCUy5bCj354UOl9TBKXmJeYOqYIreqJiGazKXwdceW5ue8yOwOcFbCAeXAFMXauR-jXRexlfwdN2jL2K6uDZ634f9Cqs_x8i511nw1A_cGunLCZsXmsoS6mjVOhC58awLN9aH4FraJtmbxUq4zNwCRmD5&u=aHR0cHMlM2ElMmYlMmZ3d3cudHJpcGFkdmlzb3IuY29tJTJmQXR0cmFjdGlvbl9Qcm9kdWN0cyUzZmdlbyUzZDI5ODEwMiUyNmRldGFpbCUzZDMyMTAyNCUyNnN0JTNkdHJ1ZSUyNm0lM2Q0MjM0OSUyNnN1cGNpJTNkLTE3MDYyODI5NDUlMjZzdXBhZyUzZDExNzg2NzY2MzIyNTkxMTAlMjZzdXBzYyUzZHMlMjZzdXBhaSUzZDczNjY3Mzk2NTY5NTQxJTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3VwdGklM2Rrd2QtNzM2NjczMzExNzkyNDQlM2Fsb2MtMTkwJTI2c3VwbHAlM2Q3Nzk5NSUyNnN1cGxpJTNkJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://responsibletechnology.org/gmo-education/","https://www.bing.com/aclick?ld=e3tSXGTSWQVyGiawvF3l8mlDVUCUw85_m1v9S9EK9l4Kar6yAUyPvg91U4xvTlbt_jmZ4jLsM-debDsXWFX94c7gshi6uzHxdEeabuV4FSrVB7HaZnHcNbYh_wIbCDhfsbzBEJL54ROmkDE3_LBoEX721dUu4fhJ9q8C30W7fCOrXYPcXY&u=aHR0cHMlM2ElMmYlMmZ3d3cuYWN0aXZlYmVhdC5jb20lMmZ5b3VyLWhlYWx0aCUyZndvbWVuJTJmNi1jb25zLWFuZC1wcm9zLW9mLWdtb3MlMmYlM2Z1dG1fbWVkaXVtJTNkY3BjJTI2dXRtX3NvdXJjZSUzZGJpbmclMjZ1dG1fY2FtcGFpZ24lM2RBQl9CTkdfVVNfREVTSy1TeW5kaWNhdGVkU2VhcmNoJTI2dXRtX2NvbnRlbnQlM2RvX2NfNzMzOTI1MzgzNDczMjMlMjZjdXNfd2lkZ2V0JTNka3dkLTczMzkyNTAzMjE5MDc1JTNhbG9jLTE5MCUyNnV0bV90ZXJtJTNkZ21vJTI2Y3VzX3RlYXNlciUzZCUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://en.wikipedia.org/wiki/Genetically_modified_organism","https://www.nongmoproject.org/gmo-facts/","https://www.livescience.com/40895-gmo-facts.html","http://www.gmo-foods.com/","https://www.nongmoproject.org/gmo-facts/what-is-gmo/","http://naturalsociety.com/top-10-worst-gmo-foods-list/","https://gmo.mercola.com/","https://www.dictionary.com/browse/gmo","https://responsibletechnology.org/10-Reasons-to-Avoid-GMOs/","https://responsibletechnology.org/gmo-education/","https://www.globalhealingcenter.com/natural-health/top-20-gmo-foods-and-ingredients-to-avoid/","http://non-gmoreport.com/what-is-non-gmo-what-are-genetically-modified-foods/","https://gmo.news/","https://gmoanswers.com/","https://www.nongmoproject.org/gmo-facts/","https://www.globalhealingcenter.com/natural-health/top-20-gmo-foods-and-ingredients-to-avoid/","http://non-gmoreport.com/what-is-non-gmo-what-are-genetically-modified-foods/","https://www.usatoday.com/story/news/nation/2012/10/28/gmo-questions/1658225/","http://articles.chicagotribune.com/2014-01-03/business/chi-gmos-all-about-genetically-modified-foods-20140103_1_gmos-project-verified-foods-market","https://www.nongmoproject.org/gmo-facts/what-is-gmo/","https://en.wikipedia.org/wiki/Genetically_modified_organism","https://www.nytimes.com/2018/04/23/well/eat/are-gmo-foods-safe.html","https://responsibletechnology.org/gmo-education/","https://gmoanswers.com/","https://ag.purdue.edu/GMOs/Pages/WhatareGMOs.aspx","https://www.scientificamerican.com/article/the-truth-about-genetically-modified-food/","http://www.slate.com/articles/health_and_science/science/2015/07/are_gmos_safe_yes_the_case_against_them_is_full_of_fraud_lies_and_errors.html","https://www.nature.com/scitable/topicpage/genetically-modified-organisms-gmos-transgenic-crops-and-732","https://www.nature.com/gt/journal/v12/n1s/full/3302627a.html","https://books.google.com/?id=-M4lR-pxqJMC","https://books.google.com/?id=aGkXFmqOcyIC&dq=Genetic+Engineering+analysis+of+DNA+PCR+Southern+sequencing","https://books.google.com/books?id=dGSj-CFxk-QC","https://books.google.com/books?id=WGDYHvOHwmwC","https://books.google.com/books?id=tc6vr0qzk_4C","https://books.google.com/books?id=xP9dzbSBTZQC","https://www.merriam-webster.com/dictionary/transgenic","https://en.wikipedia.org/wiki/Transgene","https://www.biology-online.org/dictionary/Transgenic","http://knowgenetics.org/transgenic-organisms/","http://www.thefreedictionary.com/transgenic","https://medical-dictionary.thefreedictionary.com/transgenic","https://www.bing.com/aclick?ld=e3qD7to5k9sGSx22CamCgyATVUCUw-aM5jzSitNJzC2ZBKNT9Wtz27ydjB61r5QBN0Vh5KdSyzskkxzBvDQMJztcCPmw75hWrDZk4tuvHV-XIbb2FX2q0YljeQeWVg4P2ky0EMO70YVS7MJGu_3Z5DbA962fls4AlcnG9Y-zvV-yffMGNQ&u=aHR0cCUzYSUyZiUyZnRyaWFubmkuY29tJTJmdGVjaG5vbG9neSUyZm1vdXNlJTJmJTNmbXNjbGtpZCUzZCU3Ym1zY2xraWQlN2Q","https://www.dictionary.com/browse/transgenic","https://www.merriam-webster.com/dictionary/transgenic","https://gmoanswers.com/ask/whats-difference-between-transgenic-and-genetically-modified","https://medical-dictionary.thefreedictionary.com/transgenic","https://www.thefreedictionary.com/transgenic","http://knowgenetics.org/transgenic-organisms/","http://www.yourdictionary.com/transgenic","http://biology-pages.info/T/TransgenicAnimals.html","https://www.youtube.com/watch?v=RzYhcXjksKc","https://learn.genetics.utah.edu/content/science/transgenic/","https://www.merriam-webster.com/dictionary/transgene","http://www.yourdictionary.com/transgenic","https://medical-dictionary.thefreedictionary.com/transgenic+animal","https://www.sciencedirect.com/topics/biochemistry-genetics-and-molecular-biology/transgenic","https://en.wiktionary.org/wiki/transgenic","https://en.wikipedia.org/wiki/Transgene","https://www.merriam-webster.com/dictionary/transgenic","https://www.sciencedirect.com/topics/biochemistry-genetics-and-molecular-biology/transgenic","http://knowgenetics.org/transgenic-organisms/","https://www.nature.com/scitable/topicpage/recombinant-dna-technology-and-transgenic-animals-34513","https://gmoanswers.com/ask/whats-difference-between-transgenic-and-genetically-modified","https://www.genoway.com/services/transgenic-models.htm","https://en.wiktionary.org/wiki/transgenic","https://www.medicinenet.com/script/main/art.asp?articlekey=11295","https://web.archive.org/web/20110302205347/http://mgc.wustl.edu/Protocols/TransgeneDesign/tabid/153/Default.aspx","https://web.archive.org/web/20060324225809/http://salempress.com/Store/samples/encyclopedia_of_genetics_rev/encyclopedia_of_genetics_rev_transgenic.htm","https://www.nytimes.com/2013/08/25/sunday-review/golden-rice-lifesaver.html","https://www.researchgate.net/publication/233507005_Transgenic_Brassica_napus_field_and_Brassica_rapa_weeds_in_Quebec_Sympatry_and_weed-crop_in_situ_hybridization","https://web.archive.org/web/20151208173644/http://www.usda.gov/wps/portal/usda/usdahome?contentidonly=true&contentid=2007%2F11%2F0350.xml","https://www.horizondiscovery.com/resources/scientific-literature/faq/why-is-gene-editing-better-than-transgenesis","https://en.wikipedia.org/w/index.php?title=Transgene&oldid=857059804","https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en","https://www.wikidata.org/wiki/Special:EntityPage/Q430117","https://www.vaccines.gov/","https://www.cdc.gov/vaccines/index.html","https://www.vaccines.gov/basics/index.html","https://en.wikipedia.org/wiki/Vaccine","https://www.webmd.com/children/vaccines/immunizations-vaccines-power-of-preparation","https://www.naturalnews.com/vaccines.html","https://www.niaid.nih.gov/research/vaccines","http://www.who.int/topics/vaccines/en/","https://www.bing.com/aclick?ld=e3OOc9cv2Asgprmelg0lQvGzVUCUxsAXt58m2Im1CsZBFjGpYcSe9jNIwuSMLI0_q3HM_x5bcXLTlUumfKwqh_0h6VAemWkYPsAliN7nJb2ePMilN9TJb-eyIXgwWKluPfLFT_vM0Tpff5PSOuRliXFmrHqaoiWaXB65_IG-1q2tXOhN6I&u=aHR0cCUzYSUyZiUyZnZhY2NpbmVzZm9ydHJhdmVsLnJ0cmsuY29tJTJmJTNmc2NpZCUzZDM0NjY1MzMlMjZrdyUzZDI1ODU1NTIlMjZwdWJfY3JfaWQlM2Q3MTQ2ODMyODYwMjAxOSUyNm8lMjZj&rlid=d34b230f1c311c8a767278e7ae962073","https://www.bing.com/aclick?ld=e3AQgJdh93oqyve-1bBIREmzVUCUwE4nRBQqNB-5Q6LAX8difRfGriGLK1Zpn7qaT-c03rsvJ9SldGyd07plHpoycGx3SlswQYIHz6bDh1OWq1xkzXVmDZoTKCKEjwYhpKiI3i1Yb-VAGUSqRFPQY8hXY_kokqJ5zo9xBUHIyj0VwbxORO&u=aHR0cCUzYSUyZiUyZnd3dy5hY3RpdmViZWF0LmNvbSUyZnlvdXItaGVhbHRoJTJmNi12YWNjaW5lcy10by1nZXQtaW4tYWR1bHRob29kJTJmJTNmbXNjbGtpZCUzZCU3Ym1zY2xraWQlN2QlMjZ1dG1fbWVkaXVtJTNkY3BjJTI2dXRtX3NvdXJjZSUzZGJpbmclMjZ1dG1fY2FtcGFpZ24lM2RBQl9CTkdfVVNfREVTSy1TZWFyY2hNYXJrZXRpbmclMjZ1dG1fY29udGVudCUzZG9fY183MzU5ODY1MDcyNTM4MSUyNmN1c193aWRnZXQlM2Rrd2QtNzM1OTg2MjM0ODMwMTUlM2Fsb2MtMTkwJTI2dXRtX3Rlcm0lM2RWYWNjaW5lcyUyNmN1c190ZWFzZXIlM2Q&rlid=946ec881f7781b31189d936945dfdfd4","https://www.vaccines.gov/","https://www.cdc.gov/vaccines/index.html","https://www.fda.gov/BiologicsBloodVaccines/Vaccines/default.htm","https://www.vaccines.gov/basics/index.html","https://www.webmd.com/vaccines/default.htm","https://www.niaid.nih.gov/research/vaccines","http://www.who.int/topics/vaccines/en/","https://www.youtube.com/watch?v=7VG_s2PCH_c","https://gsksource.com/pharma/content/gsk/source/us/en/global/corporate/resources/vaccines.html","http://vaccines.news/","https://en.wikipedia.org/wiki/The_Vaccines","https://en.wikipedia.org/wiki/Vaccine","https://www.merriam-webster.com/dictionary/vaccine","http://www.who.int/topics/immunization/en/","https://www.vaccines.gov/","https://www.cdc.gov/vaccines/index.html","http://www.who.int/topics/vaccines/en/","https://www.apha.org/topics-and-issues/vaccines","https://www.webmd.com/vaccines/default.htm","https://www.scientificamerican.com/article/straight-talk-about-vaccination/","https://www.nationalgeographic.com/magazine/2017/11/vaccine-health-infection-global-children/","http://discovermagazine.com/2009/jun/06-why-does-vaccine-autism-controversy-live-on","https://www.theatlantic.com/business/archive/2015/02/vaccines-are-profitable-so-what/385214/","https://www.wikidata.org/wiki/Q134808","https://www.jci.org/articles/view/80009","https://web.archive.org/web/20170629033940/http://jci.org/articles/view/80009","https://web.archive.org/web/20170811190134/http://www.jimmunol.org/content/192/9/4007.short","https://web.archive.org/web/20150313131826/http://www.phac-aspc.gc.ca/im/vpd-mev/index-eng.php","https://en.wikipedia.org/wiki/Mount_Fuji","https://www.japan-guide.com/e/e2172.html","https://www.nationalgeographic.org/media/mount-fuji/","https://www.britannica.com/place/Mount-Fuji","https://www.tripadvisor.com/Attraction_Review-g298102-d321024-Reviews-Mount_Fuji-Chubu.html","https://wikitravel.org/en/Mount_Fuji","https://www.bing.com/aclick?ld=e3tWIpBB6rQ2JFmnYZCbHNoDVUCUw7mHZlJiZ7RuB50CKR8qzpgSOIZHrKs2jONQ99pGawjd86s2AM0SuEL-jpAmgeyqoJMpFd_ckyL1ZAyym5A6VRGVICySx_w6RJyF_JI7SXJTSHSHM7tv8kVegNdTy_YFF1p97QM0zQSGj4Sc8ibvXh&u=aHR0cHMlM2ElMmYlMmZ3d3cudHJpcGFkdmlzb3IuY29tJTJmQXR0cmFjdGlvbl9Qcm9kdWN0cyUzZmdlbyUzZDI5ODEwMiUyNmRldGFpbCUzZDMyMTAyNCUyNnN0JTNkdHJ1ZSUyNm0lM2Q0MjM0OSUyNnN1cGNpJTNkLTE3MDYyODI5NDUlMjZzdXBhZyUzZDExNzg2NzY2MzIyNTkxMTAlMjZzdXBzYyUzZHMlMjZzdXBhaSUzZDczNjY3Mzk2NTY5NTQ0JTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3VwdGklM2Rrd2QtNzM2NjczMzExNzkyNDQlM2Fsb2MtMTkwJTI2c3VwbHAlM2Q3ODAxOCUyNnN1cGxpJTNkJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://www.bing.com/aclick?ld=e3ctSFlqZNLF1my1s_w8dhoTVUCUzBb7MWLy5lVMJ2BqFeWbv7CagvijmdYwcA9a-2lXJxMVTTqWkJ5SyXBw-4v9g5NyjhNlw7E_FAkg7qj9sD8iZUeCgCDGHu5NKJJB-DiCsNVAKyfwLfnCXdP1Ajx0rhIM7Vbt8SqCkzvjH6qj7OP0oP&u=aHR0cHMlM2ElMmYlMmZ3d3cuYWdvZGEuY29tJTJmcGFydG5lcnMlMmZwYXJ0bmVyc2VhcmNoLmFzcHglM2ZkZXZpY2UlM2RjJTI2bmV0d29yayUzZG8lMjZhZGlkJTNkJTdiY3JlYXRpdmUlN2QlMjZyYW5kJTNkJTdicmFuZG9tJTdkJTI2ZXhwaWQlM2QlN2JhY2VpZCU3ZCUyNmFkcG9zJTNkJTdiYWRwb3NpdGlvbiU3ZCUyNnNpdGVfaWQlM2QxNzQ0NTc2JTI2dGFnJTNkNDM2M2M0NWItMzFkZS0xNTljLWYxMGMtY2IxMzFlZDA5OTk5JTI2JTI2dXJsJTNkaHR0cHMlMjUzQSUyNTJGJTI1MkZ3d3cuYWdvZGEuY29tJTI1MkZpbmRleC5odG1sJTI2bXNjbGtpZCUzZCU3Ym1zY2xraWQlN2QlMjZ1dG1fc291cmNlJTNkYmluZyUyNnV0bV9tZWRpdW0lM2RjcGMlMjZ1dG1fY2FtcGFpZ24lM2RJbnRlbnQlMjUyMEVuZ2luZSUyNTIwLSUyNTIwMzEzJTI2dXRtX3Rlcm0lM2Rtb3VudCUyNTIwZnVqaSUyNnV0bV9jb250ZW50JTNkY2klMjUzQW1vdW50JTI1MjBmdWppXzIwNDA3NCUyNTdDZHMlMjUzQW1vdW50JTI1MjBmdWppJTI1N0NnZCUyNTNBZXhhY3Q","https://www.cancer.gov/","https://www.webmd.com/cancer/default.htm","https://en.wikipedia.org/wiki/Cancer","http://www.astrology-zodiac-signs.com/zodiac-signs/cancer/","https://www.medicinenet.com/cancer/article.htm","https://medlineplus.gov/cancer.html","https://www.cancercenter.com/cancer/","https://www.cancer.gov/about-cancer/understanding/what-is-cancer","https://www.mayoclinic.org/diseases-conditions/cancer/symptoms-causes/syc-20370588","https://en.wikipedia.org/wiki/Cancer_%28astrology%29","https://onlinelibrary.wiley.com/journal/10970142","https://www.cancer.com/","https://www.cancerresearchuk.org/","https://www.webmd.com/cancer/default.htm","https://en.wikipedia.org/wiki/Cancer","https://www.emedicinehealth.com/cancer_symptoms/article_em.htm","https://www.mayoclinic.org/diseases-conditions/cancer/symptoms-causes/syc-20370588","https://www.cancer.gov/about-cancer/causes-prevention/risk","https://www.cancer.gov/","https://www.medicinenet.com/cancer/article.htm","https://onlinelibrary.wiley.com/journal/10970142","http://www.astrology-zodiac-signs.com/zodiac-signs/cancer/","https://www.motherjones.com/politics/2018/04/did-drinking-give-me-breast-cancer/","https://draxe.com/cancer-fighting-foods/","https://www.cancerresearchuk.org/about-cancer/what-is-cancer","https://en.wiktionary.org/wiki/frailty","https://en.wiktionary.org/wiki/%CE%BA%CE%B1%CF%81%CE%BA%CE%AF%CE%BD%CE%BF%CF%82#Ancient_Greek","https://web.archive.org/web/20140608104550/http://www.nhs.uk/Conditions/cancer/Pages/symptoms.aspx","https://web.archive.org/web/20100926191037/http://seer.cancer.gov/statfacts/html/all.html","https://web.archive.org/web/20150704154440/http://www.cancer.gov/about-cancer/causes-prevention/risk/obesity/obesity-fact-sheet#q3","https://web.archive.org/web/20170712114430/http://www.searo.who.int/publications/bookstore/documents/9283204298/en/","https://web.archive.org/web/20130802043732/http://www.cancer.org/cancer/cancercauses/geneticsandcancer/heredity-and-cancer","https://web.archive.org/web/20140714120018/http://www.cancer.org/treatment/understandingyourdiagnosis/examsandtestdescriptions/testingbiopsyandcytologyspecimensforcancer/testing-biopsy-and-cytology-specimens-for-cancer-how-is-cancer-diagnosed","https://climate.nasa.gov/","https://en.wikipedia.org/wiki/Climate_change","https://ecology.wa.gov/Air-Climate/Climate-change/About-climate-change","https://www.cbsnews.com/climate-change/","https://19january2017snapshot.epa.gov/climatechange_.html","https://www.energy.gov/science-innovation/climate-change","https://www.britannica.com/science/climate-change","https://www.unenvironment.org/explore-topics/climate-change","https://www.worldbank.org/en/topic/climatechange","https://www.conservation.org/climate-facts","https://en.wikipedia.org/wiki/Climate_change","http://nymag.com/daily/intelligencer/2017/07/climate-change-earth-too-hot-for-humans.html","https://www.nytimes.com/interactive/2015/11/28/science/what-is-climate-change.html","https://www.esquire.com/news-politics/a36228/ballad-of-the-sad-climatologists-0815/","https://www.nytimes.com/section/climate","http://www.environment.gov.au/climate-change","https://www.globalchange.gov/climate-change","https://web.archive.org/web/20140529161102/http://www.nap.edu/catalog.php?record_id=12782","https://www.ipcc.ch/publications_and_data/ar4/wg1/en/ch9s9-1.html","https://www.ipcc.ch/publications_and_data/ar4/wg1/en/ch9s9-1.html","https://web.archive.org/web/20140529161102/http://www.nap.edu/catalog.php?record_id=12782","https://www.science.org.au/learning/general-audience/science-booklets-0/science-climate-change/3-are-human-activities-causing","https://www.nytimes.com/2015/11/29/opinion/sunday/what-the-paris-climate-meeting-must-do.html","https://en.wikipedia.org/wiki/Evolution","https://www.livescience.com/474-controversy-evolution-works.html","https://www.merriam-webster.com/dictionary/evolution","https://keiwan.itch.io/evolution","https://www.thefreedictionary.com/evolution","https://www.britannica.com/science/evolution-scientific-theory","https://www.ancient.eu/Mount_Fuji/","https://www.thoughtco.com/climbing-facts-about-mount-fuji-755935","https://www.nationalgeographic.com/travel/destinations/asia/japan/mount-fuji-photographs-cover-image/","https://www.bing.com/aclick?ld=e3WoA-gedbQI2iZJ5VR_NIHTVUCUwy-rE3rA4qGt3LyXhUUBPU899tlUEXhKBA0l9nkf_chaKUF_VFuPr9NVreasAAs8PvDXI975GvXhmHPP70MUleleIK6H8Nl-xmYa-kZC4qCQlGxPcAvacanPGb4W1zIR_o68gWUPJamrUZTJ9WeMiX&u=aHR0cHMlM2ElMmYlMmZ3d3cudmlhdG9yLmNvbSUyZlRva3lvLWF0dHJhY3Rpb25zJTJmTXQtRnVqaSUyZmQzMzQtYTg2JTNmbWNpZCUzZDMzOTUzJTI2dHNlbSUzZHRydWUlMjZzdXBjaSUzZDEyOTIwNTc4OTElMjZzdXBhZyUzZDExMTQ0NTE1MDUlMjZzdXBzYyUzZGt3ZC0xODUyNjc5MTM5NSUzYWxvYy0xOTAlMjZzdXBhaSUzZDc2NjIyMjQzNzk0OTczJTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNnN1cHRpJTNka3dkLTE4NTI2NzkxMzk1JTNhbG9jLTE5MCUyNnN1cGxwJTNkNzc5OTUlMjZzdXBsaSUzZCUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://www.bing.com/aclick?ld=e3lfDrJ_EVTCmMeRIqVopYzzVUCUyMyubx1Y-6ZIRAuQX3fCdlMNkUzv_Kh6exN_4cAP8nnYSiFDrjBLoGS8Xm7ZAmHaE5R8F4ZD1lt5Ycff86sZDtJ-iPjbzHNPAuStJwhjUtaTfmse-wJZ7h95rWaJ6r6nUAUb1KB3N4ZQsm4D2rMhtp&u=aHR0cHMlM2ElMmYlMmZ3d3cudHJpcGFkdmlzb3IuY29tJTJmQXR0cmFjdGlvbl9Qcm9kdWN0cyUzZmdlbyUzZDI5ODEwMiUyNmRldGFpbCUzZDMyMTAyNCUyNnN0JTNkdHJ1ZSUyNm0lM2Q0MjM0OSUyNnN1cGNpJTNkLTE3MDYyODI5NDUlMjZzdXBhZyUzZDExNzg2NzY2MzIyNTkxMTAlMjZzdXBzYyUzZHMlMjZzdXBhaSUzZDczNjY3Mzk2NTY5NTQxJTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3VwdGklM2Rrd2QtNzM2NjczMzExNzkyNDQlM2Fsb2MtMTkwJTI2c3VwbHAlM2Q3Nzk5NSUyNnN1cGxpJTNkJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://en.wikipedia.org/wiki/Evolution","https://www.dictionary.com/browse/evolution","https://keiwan.itch.io/evolution","https://www.britannica.com/science/evolution-scientific-theory","https://simple.wikipedia.org/wiki/Evolution","https://www.evolutionos.com/","https://www.imdb.com/title/tt4291590/","https://www.livescience.com/topics/evolution","https://www.thefreedictionary.com/evolution","https://www.thoughtco.com/evolution-4133366","https://www.rottentomatoes.com/m/1108206_evolution","https://www.livescience.com/474-controversy-evolution-works.html","https://keiwan.itch.io/evolution","https://en.wikipedia.org/wiki/Darwinism","http://scienceline.ucsb.edu/getkey.php?key=1135","https://www.yourgenome.org/facts/what-is-evolution","https://www.dictionary.com/browse/evolution","https://www.britannica.com/science/evolution-scientific-theory","https://www.nature.com/scitable/knowledge/evolution-13228138","https://www.imdb.com/title/tt0251075/","https://www.nature.com/news/does-evolutionary-theory-need-a-rethink-1.16080","https://www.nationalgeographic.com/magazine/2017/04/evolution-genetics-medicine-brain-technology-cyborg/","https://www.forbes.com/sites/shaenamontanari/2016/11/10/vp-elect-mike-pence-does-not-accept-evolution-heres-why-that-matters/","https://evolution.berkeley.edu/","https://web.archive.org/web/20160603230514/http://www.nas.edu/evolution/index.html","https://web.archive.org/web/20150629230719/http://apnews.excite.com/article/20131113/DAA1VSC01.html","https://www.telegraph.co.uk/news/science/science-news/10445788/Oldest-signs-of-life-on-Earth-found.html","https://web.archive.org/web/20141216062531/http://www.telegraph.co.uk/news/science/science-news/10445788/Oldest-signs-of-life-on-Earth-found.html","https://web.archive.org/web/20150630042457/http://www.nap.edu/openbook.php?record_id=11876&page=17","https://en.wikipedia.org/wiki/Association_football","http://www.fifa.com/","https://en.wikipedia.org/wiki/Football","https://www.britannica.com/sports/football-soccer","https://www.soccer24.com/","https://sports.yahoo.com/soccer/","https://www.nytimes.com/2018/11/08/movies/infinite-football-review-documentary.html","https://us.puma.com/en/us/sports/soccer","https://www.bing.com/aclick?ld=e3RlqBD1p8R4E-Eph_vp0jFjVUCUzUuCCbG2psGQdw4P6pEP5xKP0W7eXJa_qWllmPCkMwodHL4jg2sYvhnOzbIIH3h_EPvEALBi4ZZITUzyJ7pkto2JaZsH47jpirHjatIDob1KnWhntqvoDnKqEqzBnzqk8CrxzxY7tiBkxsF1OqWJHi&u=aHR0cCUzYSUyZiUyZnd3dy5jb2xsZWdlc3BvcnRzc2Nob2xhcnNoaXBzLmNvbSUyZnBwYyUyZnNwb3J0cy1zY2hvbGFyc2hpcHMlMmZzb2NjZXIlMmYlM2Ztc2Nsa2lkJTNkJTdibXNjbGtpZCU3ZCUyNnV0bV9zb3VyY2UlM2RiaW5nJTI2dXRtX21lZGl1bSUzZGNwYyUyNnV0bV9jYW1wYWlnbiUzZFNvY2NlciUyNTIwVGVybXMlMjUyMC0lMjUyMEJpbmclMjZ1dG1fdGVybSUzZGNvbGxlZ2UlMjUyMHNvY2NlciUyNTIwcHJvZ3JhbXMlMjZ1dG1fY29udGVudCUzZEZpbmQlMjUyMFNvY2NlciUyNTIwQ29sbGVnZXM&rlid=f4203b4c4e2819085f2a60a4fe60fe01","https://en.wikipedia.org/wiki/Association_football","http://www.fifa.com/","https://en.wikipedia.org/wiki/Football","https://www.britannica.com/sports/football-soccer","http://www.soccer24.com/","http://www.flashfooty.com/football_games.php","http://www.espn.com/soccer/","https://www.diffen.com/difference/American_Football_vs_Soccer","https://www.bbc.com/sport/football","http://howto.yellow.co.nz/sports-and-fitness/footballsoccer/why-is-it-called-soccer/","https://www.foxsports.com/soccer","http://www.soccergames.org/","https://en.wikipedia.org/wiki/Association_football","https://timesofindia.indiatimes.com/What-is-the-difference-between-soccer-and-football/articleshow/1454913.cms","http://www.businessinsider.com/why-americans-call-it-soccer-2014-6","http://www.espnfc.com/news","https://www.britannica.com/story/why-do-some-people-call-football-soccer","http://www.espn.com/soccer/scoreboard","http://www.espn.com/soccer/","https://en.wikibooks.org/wiki/Football_(Soccer)/The_Basics","https://www.soccer24.com/","https://www.npr.org/2018/06/30/624918819/the-big-debate-soccer-or-football","http://www.goal.com/en-us/live-scores","https://www.fifa.com/classicfootball/history/the-game/Britain-home-of-football.html","https://www.fifa.com/classicfootball/history/the-game/origins.html","https://web.archive.org/web/20080612123410/http://www.britannica.com/EBchecked/topic/550852/football","https://books.google.com/books?id=tQY5wxQDn5gC&pg=PA129&lpg=PA129&dq=world's+most+popular+team+sport&source=web&ots=6ns3wVUEGV&sig=SZPKYSDMJBrO1uV4mPxNbKyAuJY#PPA129,M1","https://books.google.com/books?id=X3lX_LVBaToC&pg=PA105&lpg=PA105&dq=world's+most+popular+team+sport&source=web&ots=ehee9Lr9o1&sig=nyvDhcrPoR8lXhYKE7k4CZYg_qU#PPA103,M1","https://books.google.com/books?id=XG6AIHLtyaUC&pg=PA57&lpg=PA57&dq=soccer+most+popular+team+sport&source=web&ots=QzydYB5Am0&sig=w_ouIgmegjytYFfWy7k92guTNfU#PPA57,M1","https://web.archive.org/web/20050314003412/http://www.fifa.com/en/marketing/newmedia/index/0%2C3509%2C10%2C00.html","https://web.archive.org/web/20170101162441/http://www.etymonline.com/index.php?allowed_in_frame=0&search=football","https://en.oxforddictionaries.com/explore/whats-the-origin-of-the-word-soccer/","https://en.wikipedia.org/wiki/Photosynthesis","https://www.britannica.com/science/photosynthesis","https://www.livescience.com/51720-photosynthesis.html","https://www2.estrellamountain.edu/faculty/farabee/BIOBK/BioBookPS.html","https://www.youtube.com/watch?v=uixA8ZXx0KU","https://www.dictionary.com/browse/photosynthesis","http://www.biology4kids.com/files/plants_photosynthesis.html","http://www.rsc.org/Education/Teachers/Resources/cfb/Photosynthesis.htm","https://en.wikipedia.org/wiki/Photosynthesis","https://www.britannica.com/science/photosynthesis","https://www.livescience.com/51720-photosynthesis.html","https://www2.estrellamountain.edu/faculty/farabee/BIOBK/BioBookPS.html","https://www.thoughtco.com/photosynthesis-373604","https://www.dictionary.com/browse/photosynthesis","https://www.youtube.com/watch?v=sQK3Yr4Sc_k","https://photosynthesiseducation.com/photosynthesis-for-kids/","https://ssec.si.edu/stemvisions-blog/what-photosynthesis","https://www.merriam-webster.com/dictionary/photosynthesis","https://www.thefreedictionary.com/photosynthesis","http://www.biology4kids.com/files/plants_photosynthesis.html","https://en.wikipedia.org/wiki/Photosynthesis","https://www.britannica.com/science/photosynthesis","https://ssec.si.edu/stemvisions-blog/what-photosynthesis","https://www2.estrellamountain.edu/faculty/farabee/BIOBK/BioBookPS.html","http://www.rsc.org/Education/Teachers/Resources/cfb/Photosynthesis.htm","http://www.biology4kids.com/files/plants_photosynthesis.html","https://www.nature.com/scitable/topicpage/photosynthetic-cells-14025371","https://www.youtube.com/watch?v=yHVhM-pLRXk","https://www.youtube.com/watch?v=sQK3Yr4Sc_k","https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en","https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute","https://foundation.wikimedia.org/wiki/Cookie_statement","https://en.wikibooks.org/wiki/Botany/Plant_cells/Photosynthesis","https://en.wikibooks.org/wiki/Special:Search?search=photosysnthesis&fulltext=1","https://www.youtube.com/watch?v=U_4QDGAy4Os","https://www.youtube.com/watch?v=HqKXOXY02bQ","https://www.yummly.com/recipes/sweet-dessert-dough","https://www.tasteofhome.com/course/desserts/easy-desserts/","https://www.walmart.com/ip/Play-Doh-Sweet-Shoppe-Double-Desserts-Playset/29765460","https://www.iheartnaptime.net/play-dough-recipe/","https://www.somewhatsimple.com/homemade-playdough-recipe/","https://www.bing.com/aclick?ld=e3gI6zYpwwHmJHwGldSVibrDVUCUw9raILByakjM1Gu7Ub9s1kZ-HFwAUI2ke8oiF-ev4xfzphgw2BDI4GL2bmeTj6dPOBXWBssDg9CPqAW17Vr9vY2KU7mZcq1o0oQINvZGoFr-DV_H09sermk140230ib_JPbXL9N_PtrnUgAIv1KHL1&u=aHR0cHMlM2ElMmYlMmZ3d3cudHJpcGFkdmlzb3IuY29tJTJmQXR0cmFjdGlvbl9Qcm9kdWN0cyUzZmdlbyUzZDI5ODEwMiUyNmRldGFpbCUzZDMyMTAyNCUyNnN0JTNkdHJ1ZSUyNm0lM2Q0MjM0OSUyNnN1cGNpJTNkLTE3MDYyODI5NDUlMjZzdXBhZyUzZDExNzg2NzY2MzIyNTkxMTAlMjZzdXBzYyUzZHMlMjZzdXBhaSUzZDczNjY3MzkxOTg1NDg0JTI2c3VwZHYlM2RjJTI2c3VwbnQlM2RvJTI2c3VwdGklM2Rrd2QtNzM2NjczMzExNzkyNDQlM2Fsb2MtMTkwJTI2c3VwbHAlM2Q3Nzk5NSUyNnN1cGxpJTNkJTI2c3Vwa3clM2Rtb3VudCUyNTIwZnVqaSUyNm1zY2xraWQlM2QlN2Jtc2Nsa2lkJTdk","https://www.tasteofhome.com/course/desserts/easy-desserts/","https://www.somewhatsimple.com/homemade-playdough-recipe/","https://www.iheartnaptime.net/play-dough-recipe/","https://www.walmart.com/ip/Play-Doh-Sweet-Shoppe-Double-Desserts-Playset/29765460","https://www.learning4kids.net/range-of-play-dough-recipes/","https://www.allrecipes.com/recipe/175520/colorful-and-edible-play-dough/","http://www.thehippyhomemaker.com/homemade-holiday-scented-play-dough-for-the-little-ones-in-your-life/","https://www.justapinch.com/recipes/dessert/cookies/play-dough-cookies.html","http://recipe-lady.com/free.php?seed=play%20dough%20recipe","https://www.target.com/p/play-doh-sweet-shoppe-double-desserts-playset/-/A-14710222","https://www.youtube.com/watch?v=HqKXOXY02bQ","https://www.youtube.com/watch?v=U_4QDGAy4Os","https://www.youtube.com/watch?v=6RFPk762YdU","https://www.youtube.com/watch?v=GuhtZC8vIOg","https://www.youtube.com/watch?v=RCpG8prariw","https://www.walmart.com/ip/Play-Doh-Sweet-Shoppe-Double-Desserts-Playset/29765460","https://en.wikisource.org/wiki/Prince_Otto","https://en.wikisource.org/wiki/Special:Search?search=play+dough+delicious+deserts&fulltext=1","https://en.wikiquote.org/wiki/Where_in_the_World_Is_Carmen_Sandiego%3F_(TV_show)","https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute","https://foundation.wikimedia.org/wiki/Cookie_statement","https://prancercise.com/quiz2/","https://www.dailyherald.com/article/20131009/entlife/710099993/","https://en.wikipedia.org/wiki/Prancercise","http://www.columbian.com/news/2013/sep/23/prancercise-a-celebration-of-self-expression/","https://www.reference.com/world-view/main-branches-philosophy-ead9595786ddb79","https://www.acefitness.org/education-and-resources/lifestyle/blog/3574/videos-that-made-exercise-go-viral","https://prancercise.com/quiz2/","https://www.dailyherald.com/article/20131009/entlife/710099993/","http://www.columbian.com/news/2013/sep/23/prancercise-a-celebration-of-self-expression/","https://www.acefitness.org/education-and-resources/lifestyle/blog/3574/videos-that-made-exercise-go-viral","https://en.wikipedia.org/wiki/Category:Holism","https://www.youtube.com/watch?v=z0O_VYcsIk8","https://www.acefitness.org/education-and-resources/lifestyle/blog/3574/videos-that-made-exercise-go-viral","https://www.amazon.com/Prancercise-Art-Physical-Spiritual-Excellence-ebook/dp/B00APLQTT0","https://www.youtube.com/watch?v=z0O_VYcsIk8","https://www.amazon.com/Prancercise-Art-Physical-Spiritual-Excellence/dp/159594480X","https://www.amazon.com/Prancercise-Art-Physical-Spiritual-Excellence-ebook/dp/B00APLQTT0","https://www.washingtonpost.com/express/wp/2013/09/17/the-mane-attraction/","http://natmonitor.com/2013/06/02/prancercise-horse-inspired-exercise-phenomenon-goes-viral/","https://www.barnesandnoble.com/w/prancercise-joanna-rohrback/1113840831","http://www.metafilter.com/130097/Coping-with-the-dark-side-of-Internet-fame-the-Prancercise-Lady","https://www.youtube.com/watch?v=tAifaBhh2xo&list=LL2KSn69M38vik6F4rL-91Jw&index=102","https://www.youtube.com/channel/UCwUizOU8pPWXdXNniXypQEQ","http://www.metafilter.com/130097/Coping-with-the-dark-side-of-Internet-fame-the-Prancercise-Lady","https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en","https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute","https://foundation.wikimedia.org/wiki/Cookie_statement","https://realitytvworld.com/","https://www.realitytea.com/","https://en.wikipedia.org/wiki/Reality_television","http://www.sheknows.com/special-series/reality-tv","http://scalar.usc.edu/works/reality-tv/the-history-of-reality-television","https://tubitv.com/category/reality_tv","https://entertainment.howstuffworks.com/reality-tv.htm","http://perezhilton.com/category/reality-tv/","https://okmagazine.com/reality-tv/","https://www.nytimes.com/topic/subject/reality-television","https://nplusonemag.com/issue-3/reviews/reality-reality-television/","https://en.wikipedia.org/wiki/Reality_television","https://www.realitytvworld.com/","http://www.tmz.com/category/reality-tv/","http://www.realitytea.com/","https://people.com/tv/people-talk-filming-reality-tv-show/","https://www.eonline.com/news/reality_tv","https://www.vanityfair.com/hollywood/2018/06/is-reality-tv-really-to-blame-for-president-donald-trump","https://nplusonemag.com/issue-3/reviews/reality-reality-television/","https://www.newyorker.com/magazine/2017/09/04/reality-tvs-wildest-disaster","https://web.archive.org/web/20081204043437/http://www.thisislondon.co.uk/film/article-23369560-details/Warhol+'reality'+film+named+in+top+100/article.do","https://www.imdb.com/title/tt0088584/","https://www.washingtonpost.com/news/arts-and-entertainment/wp/2014/06/12/14-reality-stars-who-exist-today-because-of-the-o-j-simpson-trial/","https://wikidiff.com/horse/unicorn","https://www.eventbrite.com/e/2018-2019-brumby-unicorn-club-grade-2nd-3rd-tickets-49175998736","https://www.quora.com/Why-are-they-called-unicorns-instead-of-unihorns","https://forum.tip.it/topic/260613-unicorn-vs-bunyip/","https://en.wikipedia.org/wiki/Brumby","https://wikidiff.com/horse/unicorn","https://www.eventbrite.com/e/2018-2019-brumby-unicorn-club-grade-2nd-3rd-tickets-49175998736","https://forum.tip.it/topic/260613-unicorn-vs-bunyip/","https://www.youtube.com/watch?v=bVG2prY-aeE","https://www.thesims3.com/assetDetail.html?assetId=8352590","http://afs.okstate.edu/breeds/horses/australianbrumby/","https://en.wikipedia.org/wiki/Brumby","https://en.wikipedia.org/wiki/Unicorn","https://www.fimfiction.net/blog/792371/patreon-blog-takeover-callahans-crosstime-stable-brumby-run","https://www.fimfiction.net/story/64786/4/the-broken-mare/deep-wounds-heal-slowly","http://www.farmvilledirt.com/2013/04/farmville-australia-animals.html","https://www.zappos.com/emu-boots","http://www.unicornsrule.com/rainbows-and-unicorns/","http://www.unicornsrule.com/unicorn-meaning/","http://www.aelyria.com/wiki/Unicorn","https://gizmodo.com/did-unicorns-ever-exist-1504933413","http://theconversation.com/would-you-whip-a-unicorn-the-melbourne-cup-and-imagination-33546","https://creationtoday.org/why-does-the-bible-mention-unicorns/","https://answersingenesis.org/extinct-animals/unicorns-in-the-bible/","https://carm.org/bible-unicorn","https://en.oxforddictionaries.com/definition/unicorn","http://howrse.wikia.com/wiki/Unicorn","https://didyoueverstoptothink.wordpress.com/tag/silver-brumby/","https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en","https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute","https://foundation.wikimedia.org/wiki/Cookie_statement"],"x":[0.1336206896551724,0.054080988455988466,0.1324466469203311,0.10842398342398343,0.11184406173536608,0.1237916716572843,0.09803510399375062,0.048031409343701696,0.17837732160312805,0.12007607670107671,0.16381461675579323,0.17837732160312805,0.17837732160312805,0.17837732160312805,0.05988317700817702,0.11387073863636366,0.14759187109187105,0.04339579711626954,0.24641569999579713,0.11813761025299482,0.1683899433899434,0.14388933062402448,0.114881901724007,0.06956185641953906,0.1618102796674225,0.09200049603174604,0.14866709956709956,0.2677503427128427,0.1199189409624193,0.28355575701354935,0.25604846373139073,0.1758603076216713,0.19200118900374008,0.07847179973917935,0.09501936983471077,0.09311720617690768,0.12125083250083249,0.10936351217088922,0.1007534843205575,0.11982811964155246,0.055668449197860966,0.1071918180724999,0.1758603076216713,0.12594904808616433,0.15317023044295777,0.019653430860327406,0.11570124320124317,0.09501936983471077,0.12594904808616433,0.15317023044295777,0.0996513605442177,0.07721861471861473,0.10936351217088922,0.07847179973917935,0.13295361568557448,0.1758603076216713,0.11570124320124317,0.03590082004716152,0.0664367290744409,0.09095936960642835,0.08086129919463252,0.06288725686730116,0.1051332288401254,0.14652248289345066,0.11663083538083538,0.13851840978170762,0.0938744588744589,0.058909007659007646,0.11013708513708512,0.09059650472983803,0.10386002886002889,0.1264367816091954,0.15572951739618404,0.1593367889420521,0.12896771037181995,-0.02142857142857143,0.1658143939393939,0.14476238576238576,0.1593367889420521,0.15572951739618404,0.1264367816091954,0.06609848484848484,0.0736137176888622,0.2813852813852814,0.06812996031746031,0.10157828282828281,0.055681818181818186,0.1576815953654189,0.11364389104955142,0.0876984126984127,0.09059650472983803,0.10918470418470418,0.11364389104955142,0.1264367816091954,0.06870191316619888,0.13029341029341027,0.1349925595238095,0.0876984126984127,0.129491341991342,0.05020392416225749,0.09071201582437538,0.08101801062981193,0.06841886405224218,0.051416475681181545,0.07860544217687075,0.09225020390237779,0.1985410334346505,0.1897186147186147,0.24629629629629626,0.12130394857667587,0.11599702380952377,0.11310116000184507,0.16066009852216742,0.05225048879336015,0.09847661045422242,0.09028409090909091,0.13438829787234044,0.120753681293454,0.173534255599473,0.1348725348725349,0.03455204216073781,0.11488095238095236,0.2335298473456368,0.10313209737122782,0.09601787101787103,0.07306961745737257,0.1405,0.06331976481230213,0.16875999000998973,0.11448309666341838,0.06923341727263296,0.16064814814814812,0.173534255599473,0.1292022263450835,0.09601787101787103,0.10297546897546896,0.23161859785236408,0.10875804821236293,0.0752703814410164,0.062265246107207975,0.0654380337331157,0.11957575757575757,0.11518846867189825,0.11539912772546655,0.1584455128205128,0.12829131652661066,0.06956185641953906,0.1618102796674225,0.09200049603174604,0.14866709956709956,0.24930000788194073,0.1199189409624193,0.2827996289424861,0.060161845730027544,0.07227577110389613,0.23403147117432832,0.07873460726577731,0.1938834384214819,0.10984041320997846,0.055844409002303745,0.14916007905138334,0.1234089918795801,0.1204936444274679,0.054175394497975135,0.15940697058043998,0.15950314836678472,0.2517611176702086,0.19699485199485198,0.07873460726577731,0.02335894874356413,0.1204936444274679,0.12706876456876456,0.07116383616383619,0.11092283205348534,0.1554362824675325,0.19882140504423113,0.08157654811961036,0.14955800674936956,0.13974438260152547,0.1336206896551724,0.054080988455988466,0.1324466469203311,0.11184406173536608,0.09803510399375062,0.17837732160312805,0.12007607670107671,0.16381461675579323,0.1501362476808906,0.04586508619442918,0.12480063795853272,0.08562614468864473,0.04592103298999852,0.1580952380952381,0.06218461799499938,0.06646023729357063,0.06646413110698828,0.12438405216182995,0.04586508619442918,0.07489013956102956,0.09646204233316409,0.049380961769021486,0.14739535353535357,0.1659090909090909,0.16792328042328045,0.15265405167748916,0.0229844528231625,0.0229844528231625,0.15265405167748916,0.03304704123560056,0.03504506974506973,0.0926022285168245,0.09937763007069936,0.17183574001755822,0.31378817128817127,0.11576250097208182,0.09832848142736192,0.15644233766233764,0.2059709338280767,0.36478696741854627,0.28355575701354935,0.282600780722168,0.0926022285168245,0.10386560409287683,0.31378817128817127,0.09832848142736192,0.08939720869408366,0.15679568797215857,0.14629023530233212,0.2017834278397659,0.11576250097208182,0.08867209834190969,0.1677477238993203,0.09998595561975841,0.27782467532467525,0.10593406593406599,0.09536047286047282,0.07044273005282181,0.09738301381158526,0.09943670770364728,0.13702228004553585,0.22058833501502684,0.12664848963191505,0.13952085731580122,0.10877593318631056,0.17060142238713663,0.1515833333333334,0.0017636684303350785,0.0797224476911977,0.11496960486322191,0.07428282958652094,0.0617897254260892,0.42167433743986166,0.05487459846413246,0.09197106894257145,0.16099537037037043,0.2926900584795322,0.08002540937323546,0.20791227002164508,0.2068627450980392,0.061398657806368225,0.3802697410614077,0.05520166305939001,0.08897091431348747,0.1899421850079745,0.20513033066224565,0.1749060672152274,0.05669191919191919,0.27270958613371055,0.10457060545088716,0.16037433155080216,0.2636363636363636,0.061398657806368225,0.16895933014354067,0.03124579124579124,0.0974352904040404,0.20976717286241103,0.1761941056910569,0.1749060672152274,0.06981614731614734,0.1899421850079745,0.0990655763989097,0.023989898989898988,0.42167433743986166,0.42167433743986166,0.0748954229291308,0.07227891156462585,0.14019607843137255,0.13246922348484852,0.1563119204028295,-0.013598561931895254,0.10322904368358912,0.11885310328667219,0.1115056278438021,0.09862084187742093,0.14614884283140397,0.18580638315932435,0.07385154936701328,0.16865079365079366,0.14997785452913664,0.11846799417242317,0.10126900876900878,0.09447747088592166,0.14614884283140397,0.16676406926406928,0.06950107837204611,0.0680874680874681,0.1522555096418733,0.14413611562049067,0.12551048565121417,0.12093817640692646,0.16865079365079366,0.11846799417242317,0.09675087561248276,0.14413611562049067,0.14614884283140397,0.14997785452913664,0.17166241496598644,0.06617821067821068,0.16444032158317876,0.1348725348725349,0.1985410334346505,0.12516666666666668,0.12365029865029864,0.15251190476190482,0.1527952380952381,0.21838599677955142,0.2125995984691637,0.30997023809523794,0.3776266464032423,0.2423412698412699,0.2365377964452143,0.3264472167325428,0.2827996289424861,0.3776266464032423,0.3307346563460694,0.2365377964452143,0.2423412698412699,0.334950495049505,0.24497400394346955,0.22244153684341658,0.2236058897243108,0.30100678133922815,0.241548463356974,0.27717254602641683,0.24182084578314209,0.36447639954742234,0.25735804089527503,0.2892490573942188,0.22560109289617483,0.11154680936654325,0.23244047619047617,0.05766293014303593,0.12516666666666668,0.12365029865029864,0.17953590527119936,0.1306522069884139,0.1805287042502951,0.1548679176848191,0.15275883838383836,0.19175015212961638,0.17953590527119936,0.1306522069884139,0.15253617400470548,0.17996411746411745,0.14366666666666666,0.1367907092907093,0.20290503722821956,0.23342406008846212,0.07559168973103399,0.2435934936448635,0.23378393003392994,0.1150344220996395,0.11326277888777889,0.16210370825755446,0.14315520545028745,0.2812892078681551,0.10071265540015543,0.1436261107313739,0.1985410334346505,0.12516666666666668,0.12365029865029864,0.07895321025128722,0.21765170922607632,0.10436296828905886,0.2888460497835497,0.11644240019240013,0.20373737373737372,0.1802565124933546,0.15065773897084578,0.08777638301620862,0.14165669856459331,0.07896152835420116,0.10270488543772788,0.13427491464008326,0.11539402981669934,0.1526168276168276,0.054357089191799934,0.07342602157943072,0.14691193370834094,0.08030668705166674,0.011859516598625367,0.14759187109187105,0.2424589911722265,0.14388933062402448,0.04880555555555556,0.08791666666666667,0.189831759149941,0.1868792068587151,0.09420308882009473,0.04880555555555556,0.08791666666666667,0.1868792068587151,0.1354200487012987,0.18695185271078135,0.06949458874458878,0.09420308882009473,0.1047547301033948,0.105251567821289,0.06920330155798554,0.0872860025841197,0.21987648221343875,0.16861376927166402,0.0855670015855201,0.14704489337822674,0.10543139031511123,0.14059303528330072,0.14175077204062722,0.09390944002234325,0.02960653614062706,0.09550982683982683,0.10379605088788761,0.20817733192733187,0.1985410334346505,0.12516666666666668,0.12365029865029864],"y":[26.86,30.92,27.19,23.68,18.55,15.52,21.77,24.44,22.89,11.55,19.04,22.89,22.89,22.89,15.46,19.27,28.83,16.75,19.7,16.71,12.53,17.14,20.71,16.85,21.55,19.61,19.35,20.18,13.82,17.46,18.15,16.33,17.76,14.43,18.43,23.36,17.78,23.0,23.41,16.75,29.61,17.38,16.33,13.48,17.64,29.67,18.41,18.43,13.48,17.64,25.86,21.13,23.0,14.43,31.26,16.33,18.41,11.44,18.47,13.16,19.48,19.95,33.38,34.64,57.33,35.9,28.12,23.49,23.23,18.13,19.32,21.75,34.52,33.03,20.6,27.55,20.24,15.6,33.01,34.46,21.75,12.21,13.94,11.86,14.53,18.78,15.14,41.73,22.51,30.82,18.13,23.21,22.51,21.75,17.91,15.9,35.84,30.82,18.13,15.07,16.89,33.56,15.85,23.66,28.15,18.19,14.43,40.56,22.96,32.06,15.49,16.65,16.45,24.65,33.51,61.6,18.51,18.49,18.98,33.43,31.04,16.36,21.3,33.09,59.46,10.72,14.72,25.31,15.29,16.73,25.56,41.67,18.51,32.55,59.2,22.7,23.19,18.11,18.61,21.08,19.73,73.99,12.58,12.58,28.35,32.16,16.85,21.07,19.61,19.35,18.81,13.82,18.09,6.77,59.08,24.82,14.07,16.85,15.18,30.56,32.73,15.44,13.39,17.18,24.91,16.24,34.36,23.8,14.07,23.17,13.39,32.54,59.19,15.17,24.52,16.76,15.16,17.24,18.79,27.16,30.92,27.19,18.55,21.77,22.89,11.55,19.04,19.52,15.66,19.97,48.06,19.35,29.76,18.4,54.31,32.37,22.69,15.66,17.83,14.17,16.4,14.29,31.17,23.89,28.29,21.2,21.2,28.29,18.68,24.98,10.88,16.82,25.23,25.06,27.15,18.68,15.53,14.78,21.29,17.46,17.53,10.88,26.86,25.06,18.68,11.55,17.19,20.22,22.07,27.14,20.36,19.25,17.25,23.97,16.99,20.72,12.83,26.19,18.62,22.43,17.86,15.3,16.94,22.33,17.66,20.86,18.39,30.37,80.54,16.65,15.92,20.77,15.92,17.08,25.53,74.35,31.02,27.4,15.36,15.96,17.19,15.87,17.0,26.06,26.94,45.66,15.65,45.4,16.75,49.14,45.49,15.96,41.2,17.95,26.91,14.24,48.6,45.66,14.67,26.06,14.38,55.24,20.77,20.77,19.78,18.97,41.28,18.89,15.31,13.86,45.91,16.77,20.09,16.71,13.0,14.18,21.22,13.84,14.01,16.91,20.95,17.13,13.0,14.45,20.87,14.29,10.86,15.32,28.16,40.86,13.84,16.91,20.74,15.32,13.0,14.01,13.81,15.51,11.24,14.66,14.43,18.25,16.45,15.9,25.87,12.87,12.13,328.34,13.33,35.81,12.18,14.07,18.09,13.33,14.09,12.18,35.81,16.28,15.9,19.86,17.16,10.87,22.84,12.34,12.69,12.19,14.13,10.39,44.13,12.86,18.87,6.41,18.25,16.45,31.09,21.84,23.98,29.22,26.49,16.91,31.09,21.84,29.19,17.12,28.04,14.29,14.84,22.53,13.6,20.4,22.52,17.84,19.36,22.9,16.06,18.65,12.4,16.2,14.43,18.25,16.45,50.77,16.65,14.45,31.39,15.96,64.92,18.88,13.75,15.01,14.78,17.13,14.56,55.85,15.42,21.15,18.0,13.51,28.52,17.23,15.51,28.83,20.06,17.02,26.42,19.22,19.8,20.87,19.11,26.42,19.22,20.87,11.11,11.79,21.68,19.11,22.06,13.65,12.62,52.13,29.08,17.7,17.57,16.6,20.17,18.25,16.59,20.88,22.4,66.52,20.79,15.28,14.43,18.25,16.45]},"selected":{"id":"0a7a4a3a-bcf2-454c-8651-a8bc0478dd4c","type":"Selection"},"selection_policy":{"id":"f3b7b448-1c3a-45e0-a75d-5e275f35b7c4","type":"UnionRenderers"}},"id":"977bef5d-4845-4672-92ae-d24024205e00","type":"ColumnDataSource"},{"attributes":{"source":{"id":"977bef5d-4845-4672-92ae-d24024205e00","type":"ColumnDataSource"}},"id":"980c2162-a7bc-4779-ac54-6a8150dda7c9","type":"CDSView"},{"attributes":{},"id":"0a7a4a3a-bcf2-454c-8651-a8bc0478dd4c","type":"Selection"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"6721b66d-2bb5-4412-94f1-8ed3a203d36d","type":"TapTool"},{"id":"0f36c570-36ff-4f4e-9621-2926a412a1af","type":"HoverTool"}]},"id":"d5202e11-60e3-440e-9f3c-c93ad7908b58","type":"Toolbar"},{"attributes":{"fill_color":{"value":"#1f77b4"},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":8},"x":{"field":"x"},"y":{"field":"y"}},"id":"9e48417a-f355-491d-b7b3-27edd48e28f3","type":"Circle"},{"attributes":{},"id":"86332736-db65-4ff6-85d9-5684e2c6d0d7","type":"LinearScale"},{"attributes":{"callback":null,"renderers":"auto"},"id":"0f36c570-36ff-4f4e-9621-2926a412a1af","type":"HoverTool"},{"attributes":{"callback":null},"id":"a487cd9c-1792-4653-ada4-602e63edfcc2","type":"DataRange1d"},{"attributes":{"callback":null},"id":"15aa407b-b7b9-4ace-b767-8b8246118ad0","type":"DataRange1d"},{"attributes":{},"id":"2676178f-7db0-42ff-afef-17b664864e4a","type":"BasicTickFormatter"},{"attributes":{},"id":"0d223cd9-358b-4e67-9ede-1c8b729d236a","type":"LinearScale"},{"attributes":{"plot":{"id":"5af1272b-5193-4209-9a37-6cbb308fc225","subtype":"Figure","type":"Plot"},"ticker":{"id":"b48beff8-0c12-437a-b899-337aa3db58e4","type":"BasicTicker"}},"id":"d0348379-a522-43fc-b5d9-e950bff21ab6","type":"Grid"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"size":{"units":"screen","value":8},"x":{"field":"x"},"y":{"field":"y"}},"id":"67e2703d-7168-4aa9-9e26-d9f49e97a02f","type":"Circle"},{"attributes":{},"id":"b48beff8-0c12-437a-b899-337aa3db58e4","type":"BasicTicker"},{"attributes":{"formatter":{"id":"2676178f-7db0-42ff-afef-17b664864e4a","type":"BasicTickFormatter"},"plot":{"id":"5af1272b-5193-4209-9a37-6cbb308fc225","subtype":"Figure","type":"Plot"},"ticker":{"id":"b48beff8-0c12-437a-b899-337aa3db58e4","type":"BasicTicker"}},"id":"a8075fb1-6457-439b-8c24-77d4bbb3d8c0","type":"LinearAxis"},{"attributes":{"url":"@links"},"id":"04493470-2223-4658-b481-ee33844227d5","type":"OpenURL"},{"attributes":{},"id":"3e992d6f-acf7-4869-90cc-3cf49cc1ee7a","type":"BasicTicker"},{"attributes":{"callback":{"id":"04493470-2223-4658-b481-ee33844227d5","type":"OpenURL"}},"id":"6721b66d-2bb5-4412-94f1-8ed3a203d36d","type":"TapTool"},{"attributes":{"data_source":{"id":"977bef5d-4845-4672-92ae-d24024205e00","type":"ColumnDataSource"},"glyph":{"id":"9e48417a-f355-491d-b7b3-27edd48e28f3","type":"Circle"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"67e2703d-7168-4aa9-9e26-d9f49e97a02f","type":"Circle"},"selection_glyph":null,"view":{"id":"980c2162-a7bc-4779-ac54-6a8150dda7c9","type":"CDSView"}},"id":"b4dfb650-6e34-4861-a11f-2a441979903f","type":"GlyphRenderer"},{"attributes":{"formatter":{"id":"cf5d6223-0971-4d4f-92ed-f71948b45bce","type":"BasicTickFormatter"},"plot":{"id":"5af1272b-5193-4209-9a37-6cbb308fc225","subtype":"Figure","type":"Plot"},"ticker":{"id":"3e992d6f-acf7-4869-90cc-3cf49cc1ee7a","type":"BasicTicker"}},"id":"d53d7a4e-de89-4afb-b85e-4cbfc87f677c","type":"LinearAxis"},{"attributes":{},"id":"cf5d6223-0971-4d4f-92ed-f71948b45bce","type":"BasicTickFormatter"},{"attributes":{"below":[{"id":"a8075fb1-6457-439b-8c24-77d4bbb3d8c0","type":"LinearAxis"}],"left":[{"id":"d53d7a4e-de89-4afb-b85e-4cbfc87f677c","type":"LinearAxis"}],"plot_height":1000,"plot_width":1000,"renderers":[{"id":"a8075fb1-6457-439b-8c24-77d4bbb3d8c0","type":"LinearAxis"},{"id":"d0348379-a522-43fc-b5d9-e950bff21ab6","type":"Grid"},{"id":"d53d7a4e-de89-4afb-b85e-4cbfc87f677c","type":"LinearAxis"},{"id":"0f45f497-5e12-4c21-a6d2-17ad63d3a0a6","type":"Grid"},{"id":"b4dfb650-6e34-4861-a11f-2a441979903f","type":"GlyphRenderer"}],"title":{"id":"1c9f950d-a21e-43a0-90d2-d7c4a2882e0d","type":"Title"},"toolbar":{"id":"d5202e11-60e3-440e-9f3c-c93ad7908b58","type":"Toolbar"},"x_range":{"id":"a487cd9c-1792-4653-ada4-602e63edfcc2","type":"DataRange1d"},"x_scale":{"id":"0d223cd9-358b-4e67-9ede-1c8b729d236a","type":"LinearScale"},"y_range":{"id":"15aa407b-b7b9-4ace-b767-8b8246118ad0","type":"DataRange1d"},"y_scale":{"id":"86332736-db65-4ff6-85d9-5684e2c6d0d7","type":"LinearScale"}},"id":"5af1272b-5193-4209-9a37-6cbb308fc225","subtype":"Figure","type":"Plot"},{"attributes":{},"id":"f3b7b448-1c3a-45e0-a75d-5e275f35b7c4","type":"UnionRenderers"},{"attributes":{"plot":null,"text":"Sentiment versus Complexity"},"id":"1c9f950d-a21e-43a0-90d2-d7c4a2882e0d","type":"Title"}],"root_ids":["5af1272b-5193-4209-9a37-6cbb308fc225"]},"title":"Bokeh Application","version":"0.13.0"}} - </script> - <script type="text/javascript"> - (function() { - var fn = function() { - Bokeh.safely(function() { - (function(root) { - function embed_document(root) { - - var docs_json = document.getElementById('d80bec96-df4e-4af9-91bb-ba6daa5f39fb').textContent; - var render_items = [{"docid":"1e6effd5-2512-4bb1-8666-88153ca295e0","roots":{"5af1272b-5193-4209-9a37-6cbb308fc225":"7942579f-3fe7-454a-9a79-75739fa55f07"}}]; - root.Bokeh.embed.embed_items(docs_json, render_items); - - } - if (root.Bokeh !== undefined) { - embed_document(root); - } else { - var attempts = 0; - var timer = setInterval(function(root) { - if (root.Bokeh !== undefined) { - embed_document(root); - clearInterval(timer); - } - attempts++; - if (attempts > 100) { - console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing") - clearInterval(timer); - } - }, 10, root) - } - })(window); - }); - }; - if (document.readyState != "loading") fn(); - else document.addEventListener("DOMContentLoaded", fn); - })(); - </script> - - </body> - -</html> \ No newline at end of file diff --git a/old/with_julia/Dockerfile b/old/with_julia/Dockerfile deleted file mode 100644 index 80f50dc2856fd0028cefeeb8bc7559057c373c42..0000000000000000000000000000000000000000 --- a/old/with_julia/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM russelljarvis/science_accessibility:slc - -USER root - -# Install some Debian package -RUN apt-get update && apt-get install -y --no-install-recommends \ - python3-setuptools \ - python3-wheel \ - python3-pip \ - less \ - nano \ - sudo \ - git \ - npm \ - && rm -rf /var/lib/apt/lists/* - -# install Jupyter via pip -RUN pip3 install notebook - -# install ipywidgets -RUN pip3 install ipywidgets && \ - jupyter nbextension enable --sys-prefix --py widgetsnbextension - - -RUN sudo /opt/conda/bin/conda install --channel conda-forge appmode - - - -RUN jupyter nbextension enable --py --sys-prefix appmode && \ - jupyter serverextension enable --py --sys-prefix appmode -# Launch Notebook server -EXPOSE 8888 -CMD ["jupyter-notebook", "--ip=0.0.0.0", "--allow-root", "--no-browser", "--NotebookApp.token=''"] diff --git a/online_app_backend.py b/online_app_backend.py index ac78425df7c1cb8f5d67a1d5bf0e2b291016e7d3..953cc7a1236633943e25171fe139b577d342a6e4 100644 --- a/online_app_backend.py +++ b/online_app_backend.py @@ -1,7 +1,6 @@ import copy import matplotlib.pyplot as plt import seaborn as sns -#plt.backend("") import os.path import pdb import pickle @@ -12,16 +11,12 @@ import numpy as np import pandas as pd from bs4 import BeautifulSoup -from crawl import collect_pubs#, collect_hosted_files +from crawl import collect_pubs from get_bmark_corpus import process from t_analysis import text_proc -# Put these results, in a data frame, then in Markdown, using RGerkin's code. -# https://gist.github.com/rgerkin/af5b27a0e30531c30f2bf628aa41a553 -# !pip install --user tabulate # Install the tabulate package -from tabulate import tabulate from t_analysis import text_proc, perplexity, unigram_zipf - +import streamlit as st def metricss(rg): if isinstance(rg,list): @@ -46,6 +41,25 @@ def filter_empty(the_list): return [ tl for tl in the_list if 'standard' in tl.keys() ] +from tqdm import tqdm +import streamlit as st + + +class tqdm: + def __init__(self, iterable, title=None): + if title: + st.write(title) + self.prog_bar = st.progress(0) + self.iterable = iterable + self.length = len(iterable) + self.i = 0 + + def __iter__(self): + for obj in self.iterable: + yield obj + self.i += 1 + current_prog = self.i / self.length + self.prog_bar.progress(current_prog) def take_url_from_gui(author_link_scholar_link_list): ''' @@ -53,16 +67,15 @@ def take_url_from_gui(author_link_scholar_link_list): authors scholar page. ''' author_results = [] - follow_links = collect_pubs(author_link_scholar_link_list)[0:5] - for r in follow_links: + follow_links = collect_pubs(author_link_scholar_link_list)[0:10] + for r in tqdm(follow_links,title='Progess of scraping'): try: urlDat = process(r) - except: follow_more_links = collect_pubs(r) - for r in follow_more_links: + for r in tqdm(follow_more_links,title='Progess of scraping'): urlDat = process(r) - print(urlDat) + if not isinstance(urlDat,type(None)): author_results.append(urlDat) @@ -112,33 +125,15 @@ def info_models(author_results): def update_web_form(url): - print(url) - #data = author_results = {} author_results = take_url_from_gui(url) ar = copy.copy(author_results) - #data[name] = author_results - #for k,v in author_results.items(): datax = filter_empty(ar) datay = metricss(ar) - print(datay) df = pd.DataFrame(datax) - print(df) return df, datay, author_results -# Optionally give the dataframe's index a name -#df.index.name = "my_index" -# Create the markdown string def enter_name_here(scholar_page, name): df, datay, author_results = update_web_form(scholar_page) - #author_results - ''' - md = tabulate(df, headers='keys', tablefmt='pipe') - # Fix the markdown string; it will not render with an empty first table cell, - # so if the dataframe's index has no name, just place an 'x' there. - md = md.replace('| |','| %s |' % (df.index.name if df.index.name else 'x')) - # Create the Markdown object - result = d.Markdown(md) - ''' return df, datay, author_results def find_nearest(array, value): @@ -151,27 +146,25 @@ def ar_manipulation(ar): ar = [ tl for tl in ar if type(tl) is not type(str('')) ] ar = [ tl for tl in ar if 'standard' in tl.keys() ] - #with open(str('more_authors_results.p'),'wb') as f: - # pickle.dump([NAME,ar],f) - - with open('traingDats.p','rb') as f: + with open('data/traingDats.p','rb') as f: trainingDats = pickle.load(f) trainingDats.extend(ar) return (ar, trainingDats) +#@st.cache def call_from_front_end(NAME,tour=None,NAME1=None,verbose=False): if type(tour) is type(None): scholar_link=str('https://scholar.google.com/scholar?hl=en&as_sdt=0%2C3&q=')+str(NAME) df, datay, ar = enter_name_here(scholar_link,NAME) - with open('_author_specific'+str(NAME)+'.p','wb') as f: pickle.dump([NAME,ar,df,datay,scholar_link],f) + with open('_author_specific'+str(NAME)+'.p','wb') as f: + pickle.dump([NAME,ar,df,datay,scholar_link],f) (ar, trainingDats) = ar_manipulation(ar) with open('traingDats.p','wb') as f: pickle.dump(trainingDats,f) - import plotting_author_versus_distribution return ar else: @@ -181,5 +174,5 @@ def call_from_front_end(NAME,tour=None,NAME1=None,verbose=False): scholar_link=str('https://scholar.google.com/scholar?hl=en&as_sdt=0%2C3&q=')+str(NAME1) df, datay, ar = enter_name_here(scholar_link,NAME1) (ar1, trainingDats) = ar_manipulation(ar) - import plotting_author_versus_distribution + #import plotting_author_versus_distribution return [ar0,ar1] diff --git a/paper.md b/paper.md index 9de7c380d144417290069b62000c7b83877c8a83..bf11652421d938cba0a61ca07eebcf158465e6f3 100644 --- a/paper.md +++ b/paper.md @@ -1,5 +1,5 @@ title: 'A Tool for Assesing the Readability of Scientific Publications on Mass' - + tags: - readability - science communication @@ -14,19 +14,23 @@ authors: affiliation: Senior Data Scientist, H2O.ai - name: Bradley G Lusk affiliation: Science The Earth; Mesa, AZ 85201, USA - + - name: Elise King + affiliation: Field Ecologist, University of Melbourne + + + date: 20 October 2019 bibliography: paper.bib # Summary -To ensure that writing is accessible to the general population, authors must consider the length of written text, as well as sentence structure, vocabulary, and other language features [@Kutner:2006]. While popular magazines, newspapers, and other outlets purposefully cater language for a wide audience, there is a tendency for academic writing to use more complex, jargon-heavy language [@Plavén-Sigray:2017]. +To ensure that writing is accessible to the general population, authors must consider the length of written text, as well as sentence structure, vocabulary, and other language features [@Kutner:2006]. While popular magazines, newspapers, and other outlets purposefully cater language for a wide audience, there is a tendency for academic writing to use more complex, jargon-heavy language [@Plavén-Sigray:2017]. In the age of growing science communication, this tendency for scientists to use more complex language can carry over when writing in more mainstream media, such as blogs and social media. This can make public-facing material difficult to comprehend, undermining efforts to communicate scientific topics to the general public. While readability tools, such as Readable (https://www.webfx.com/tools/read-able/) and Upgoer5 (https://splasho.com/upgoer5/) currently exist to report on readability of text, they report the complexity of only a single document. In addition, these tools do not address complexity in a more academic-type setting. -To address this, we created a tool that uses a data-driven approach to provide authors with insights into the readability of the entirety of their published scholarly work with regard to other text repositories. The tool first quantifies existing text repositories with varying complexity, and subsequently uses this output as a reference to show how the readability of user-selected written work compares to these other known resources. +To address this, we created a tool that uses a data-driven approach to provide authors with insights into the readability of the entirety of their published scholarly work with regard to other text repositories. The tool first quantifies existing text repositories with varying complexity, and subsequently uses this output as a reference to show how the readability of user-selected written work compares to these other known resources. This tool also introduces one additional feature for readability comparison and improvement. It allows the entry of two author names to enable a competition as to whose text has the lowest average readability score. Public competitions can often incentivize good practices, and this may be a fun and interactive tool to help improve readability scores over time. @@ -46,7 +50,7 @@ We first query a number of available text repositories with varying complexity: | Post-Modern Essay Generator (PMEG) | 16.5 | generates output consisting of sentences that obey the rules of written English, but without restraints on the semantic conceptual references | | Art Corpus | 18.68 | library of scientific papers published in The Royal Society of Chemistry | -Entering an author's name (or two authors for the competition plot) by the user begins a query through Google Scholar, returning the scraped results from articles containing the author's name(s). +Entering an author's name (or two authors for the competition plot) by the user begins a query through Google Scholar, returning the scraped results from articles containing the author's name(s). The Flesch-Kincaid readability score [@Kincaid:1975] - the most commonly used metric to assess readability - is then used to quantify the complexity of all items. @@ -59,7 +63,7 @@ Data are available here: [Open Science Framework data repository](https://osf.io ## Contextualized Readability Output The generated plot for contextualized readability information is a histogram binned by readability score, initially populated exclusively by the ART corpus [@Soldatova:2007] data. We use this data because it is a pre-established library of scientific papers. The readability of ART Corpus has also been shown to be comparable to that of other scientific journals [2]. -The mean readability scores of Upgoer5 [@Kuhn:2016], Wikipedia, and PMEG [@Bulhak:1996] libraries are labeled on the plot as single data points to contextualize the complexity of the ART corpus data with other text repositories of known complexity. +The mean readability scores of Upgoer5 [@Kuhn:2016], Wikipedia, and PMEG [@Bulhak:1996] libraries are labeled on the plot as single data points to contextualize the complexity of the ART corpus data with other text repositories of known complexity. We also include mean readability scores from two scholarly reference papers, Science Declining Over Time [@Kutner:2006] and Science of Writing [@Gopen:1990], which discuss writing to a broad audience in an academic context. We use these to demonstrate the feasibility of discussing complex content using more accessible language. diff --git a/requirements.txt b/requirements.txt index 91834b1ca23300b453d17143f7669b1619e2122a..58e60511c8ac33e8a9d465fb2acadb94c7fb8cec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,21 @@ -textstat -BeautifulSoup +PyPDF2 +pycld2 nltk +selenium +delver +pdfminer +pyvirtualdisplay +textstat +fsspec>=0.3.3 +textblob +twython +streamlit wordcloud +seaborn +bs4 +natsort +dask +plotly +tabulate +#jupyter-server-proxy==1.2.0 +#nbserverproxy==0.8.8 diff --git a/scholar.py b/scholar.py new file mode 100755 index 0000000000000000000000000000000000000000..13ccd4394b714b68d7245a22e4bcb8106887c30b --- /dev/null +++ b/scholar.py @@ -0,0 +1,1310 @@ +#! /usr/bin/env python +""" +This module provides classes for querying Google Scholar and parsing +returned results. It currently *only* processes the first results +page. It is not a recursive crawler. +""" +# ChangeLog +# --------- +# +# 2.11 The Scholar site seems to have become more picky about the +# number of results requested. The default of 20 in scholar.py +# could cause HTTP 503 responses. scholar.py now doesn't request +# a maximum unless you provide it at the comment line. (For the +# time being, you still cannot request more than 20 results.) +# +# 2.10 Merged a fix for the "TypError: quote_from_bytes()" problem on +# Python 3.x from hinnefe2. +# +# 2.9 Fixed Unicode problem in certain queries. Thanks to smidm for +# this contribution. +# +# 2.8 Improved quotation-mark handling for multi-word phrases in +# queries. Also, log URLs %-decoded in debugging output, for +# easier interpretation. +# +# 2.7 Ability to extract content excerpts as reported in search results. +# Also a fix to -s|--some and -n|--none: these did not yet support +# passing lists of phrases. This now works correctly if you provide +# separate phrases via commas. +# +# 2.6 Ability to disable inclusion of patents and citations. This +# has the same effect as unchecking the two patents/citations +# checkboxes in the Scholar UI, which are checked by default. +# Accordingly, the command-line options are --no-patents and +# --no-citations. +# +# 2.5: Ability to parse global result attributes. This right now means +# only the total number of results as reported by Scholar at the +# top of the results pages (e.g. "About 31 results"). Such +# global result attributes end up in the new attrs member of the +# used ScholarQuery class. To render those attributes, you need +# to use the new --txt-globals flag. +# +# Rendering global results is currently not supported for CSV +# (as they don't fit the one-line-per-article pattern). For +# grepping, you can separate the global results from the +# per-article ones by looking for a line prefix of "[G]": +# +# $ scholar.py --txt-globals -a "Einstein" +# [G] Results 11900 +# +# Title Can quantum-mechanical description of physical reality be considered complete? +# URL http://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777 +# Year 1935 +# Citations 12804 +# Versions 80 +# Cluster ID 8174092782678430881 +# Citations list http://scholar.google.com/scholar?cites=8174092782678430881&as_sdt=2005&sciodt=0,5&hl=en +# Versions list http://scholar.google.com/scholar?cluster=8174092782678430881&hl=en&as_sdt=0,5 +# +# 2.4: Bugfixes: +# +# - Correctly handle Unicode characters when reporting results +# in text format. +# +# - Correctly parse citation-only (i.e. linkless) results in +# Google Scholar results. +# +# 2.3: Additional features: +# +# - Direct extraction of first PDF version of an article +# +# - Ability to pull up an article cluster's results directly. +# +# This is based on work from @aliparsai on GitHub -- thanks! +# +# - Suppress missing search results (so far shown as "None" in +# the textual output form. +# +# 2.2: Added a logging option that reports full HTML contents, for +# debugging, as well as incrementally more detailed logging via +# -d up to -dddd. +# +# 2.1: Additional features: +# +# - Improved cookie support: the new --cookie-file options +# allows the reuse of a cookie across invocations of the tool; +# this allows higher query rates than would otherwise result +# when invoking scholar.py repeatedly. +# +# - Workaround: remove the num= URL-encoded argument from parsed +# URLs. For some reason, Google Scholar decides to propagate +# the value from the original query into the URLs embedded in +# the results. +# +# 2.0: Thorough overhaul of design, with substantial improvements: +# +# - Full support for advanced search arguments provided by +# Google Scholar +# +# - Support for retrieval of external citation formats, such as +# BibTeX or EndNote +# +# - Simple logging framework to track activity during execution +# +# 1.7: Python 3 and BeautifulSoup 4 compatibility, as well as printing +# of usage info when no options are given. Thanks to Pablo +# Oliveira (https://github.com/pablooliveira)! +# +# Also a bunch of pylinting and code cleanups. +# +# 1.6: Cookie support, from Matej Smid (https://github.com/palmstrom). +# +# 1.5: A few changes: +# +# - Tweak suggested by Tobias Isenberg: use unicode during CSV +# formatting. +# +# - The option -c|--count now understands numbers up to 100 as +# well. Likewise suggested by Tobias. +# +# - By default, text rendering mode is now active. This avoids +# confusion when playing with the script, as it used to report +# nothing when the user didn't select an explicit output mode. +# +# 1.4: Updates to reflect changes in Scholar's page rendering, +# contributed by Amanda Hay at Tufts -- thanks! +# +# 1.3: Updates to reflect changes in Scholar's page rendering. +# +# 1.2: Minor tweaks, mostly thanks to helpful feedback from Dan Bolser. +# Thanks Dan! +# +# 1.1: Made author field explicit, added --author option. +# +# Don't complain about missing docstrings: pylint: disable-msg=C0111 +# +# Copyright 2010--2017 Christian Kreibich. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +import optparse +import os +import re +import sys +import warnings + +try: + # Try importing for Python 3 + # pylint: disable-msg=F0401 + # pylint: disable-msg=E0611 + from urllib.request import HTTPCookieProcessor, Request, build_opener + from urllib.parse import quote, unquote + from http.cookiejar import MozillaCookieJar +except ImportError: + # Fallback for Python 2 + from urllib2 import Request, build_opener, HTTPCookieProcessor + from urllib import quote, unquote + from cookielib import MozillaCookieJar + +# Import BeautifulSoup -- try 4 first, fall back to older +try: + from bs4 import BeautifulSoup +except ImportError: + try: + from BeautifulSoup import BeautifulSoup + except ImportError: + print('We need BeautifulSoup, sorry...') + sys.exit(1) + +# Support unicode in both Python 2 and 3. In Python 3, unicode is str. +if sys.version_info[0] == 3: + unicode = str # pylint: disable-msg=W0622 + encode = lambda s: unicode(s) # pylint: disable-msg=C0103 +else: + def encode(s): + if isinstance(s, basestring): + return s.encode('utf-8') # pylint: disable-msg=C0103 + else: + return str(s) + + +class Error(Exception): + """Base class for any Scholar error.""" + + +class FormatError(Error): + """A query argument or setting was formatted incorrectly.""" + + +class QueryArgumentError(Error): + """A query did not have a suitable set of arguments.""" + + +class SoupKitchen(object): + """Factory for creating BeautifulSoup instances.""" + + @staticmethod + def make_soup(markup, parser=None): + """Factory method returning a BeautifulSoup instance. The created + instance will use a parser of the given name, if supported by + the underlying BeautifulSoup instance. + """ + if 'bs4' in sys.modules: + # We support parser specification. If the caller didn't + # specify one, leave it to BeautifulSoup to pick the most + # suitable one, but suppress the user warning that asks to + # select the most suitable parser ... which BS then + # selects anyway. + if parser is None: + warnings.filterwarnings('ignore', 'No parser was explicitly specified') + return BeautifulSoup(markup, parser) + + return BeautifulSoup(markup) + +class ScholarConf(object): + """Helper class for global settings.""" + + VERSION = '2.10' + LOG_LEVEL = 1 + MAX_PAGE_RESULTS = 10 # Current default for per-page results + SCHOLAR_SITE = 'http://scholar.google.com' + + # USER_AGENT = 'Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.9) Gecko/20100913 Firefox/3.6.9' + # Let's update at this point (3/14): + USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0' + + # If set, we will use this file to read/save cookies to enable + # cookie use across sessions. + COOKIE_JAR_FILE = None + +class ScholarUtils(object): + """A wrapper for various utensils that come in handy.""" + + LOG_LEVELS = {'error': 1, + 'warn': 2, + 'info': 3, + 'debug': 4} + + @staticmethod + def ensure_int(arg, msg=None): + try: + return int(arg) + except ValueError: + raise FormatError(msg) + + @staticmethod + def log(level, msg): + if level not in ScholarUtils.LOG_LEVELS.keys(): + return + if ScholarUtils.LOG_LEVELS[level] > ScholarConf.LOG_LEVEL: + return + sys.stderr.write('[%5s] %s' % (level.upper(), msg + '\n')) + sys.stderr.flush() + + +class ScholarArticle(object): + """ + A class representing articles listed on Google Scholar. The class + provides basic dictionary-like behavior. + """ + def __init__(self): + # The triplets for each keyword correspond to (1) the actual + # value, (2) a user-suitable label for the item, and (3) an + # ordering index: + self.attrs = { + 'title': [None, 'Title', 0], + 'url': [None, 'URL', 1], + 'year': [None, 'Year', 2], + 'num_citations': [0, 'Citations', 3], + 'num_versions': [0, 'Versions', 4], + 'cluster_id': [None, 'Cluster ID', 5], + 'url_pdf': [None, 'PDF link', 6], + 'url_citations': [None, 'Citations list', 7], + 'url_versions': [None, 'Versions list', 8], + 'url_citation': [None, 'Citation link', 9], + 'excerpt': [None, 'Excerpt', 10], + } + + # The citation data in one of the standard export formats, + # e.g. BibTeX. + self.citation_data = None + + def __getitem__(self, key): + if key in self.attrs: + return self.attrs[key][0] + return None + + def __len__(self): + return len(self.attrs) + + def __setitem__(self, key, item): + if key in self.attrs: + self.attrs[key][0] = item + else: + self.attrs[key] = [item, key, len(self.attrs)] + + def __delitem__(self, key): + if key in self.attrs: + del self.attrs[key] + + def set_citation_data(self, citation_data): + self.citation_data = citation_data + + def as_txt(self): + # Get items sorted in specified order: + items = sorted(list(self.attrs.values()), key=lambda item: item[2]) + # Find largest label length: + max_label_len = max([len(str(item[1])) for item in items]) + fmt = '%%%ds %%s' % max_label_len + res = [] + for item in items: + if item[0] is not None: + res.append(fmt % (item[1], item[0])) + return '\n'.join(res) + + def as_csv(self, header=False, sep='|'): + # Get keys sorted in specified order: + keys = [pair[0] for pair in \ + sorted([(key, val[2]) for key, val in list(self.attrs.items())], + key=lambda pair: pair[1])] + res = [] + if header: + res.append(sep.join(keys)) + res.append(sep.join([unicode(self.attrs[key][0]) for key in keys])) + return '\n'.join(res) + + def as_citation(self): + """ + Reports the article in a standard citation format. This works only + if you have configured the querier to retrieve a particular + citation export format. (See ScholarSettings.) + """ + return self.citation_data or '' + + +class ScholarArticleParser(object): + """ + ScholarArticleParser can parse HTML document strings obtained from + Google Scholar. This is a base class; concrete implementations + adapting to tweaks made by Google over time follow below. + """ + def __init__(self, site=None): + self.soup = None + self.article = None + self.site = site or ScholarConf.SCHOLAR_SITE + self.year_re = re.compile(r'\b(?:20|19)\d{2}\b') + + def handle_article(self, art): + """ + The parser invokes this callback on each article parsed + successfully. In this base class, the callback does nothing. + """ + + def handle_num_results(self, num_results): + """ + The parser invokes this callback if it determines the overall + number of results, as reported on the parsed results page. The + base class implementation does nothing. + """ + + def parse(self, html): + """ + This method initiates parsing of HTML content, cleans resulting + content as needed, and notifies the parser instance of + resulting instances via the handle_article callback. + """ + self.soup = SoupKitchen.make_soup(html) + + # This parses any global, non-itemized attributes from the page. + self._parse_globals() + + # Now parse out listed articles: + for div in self.soup.findAll(ScholarArticleParser._tag_results_checker): + self._parse_article(div) + self._clean_article() + if self.article['title']: + self.handle_article(self.article) + + def _clean_article(self): + """ + This gets invoked after we have parsed an article, to do any + needed cleanup/polishing before we hand off the resulting + article. + """ + if self.article['title']: + self.article['title'] = self.article['title'].strip() + + def _parse_globals(self): + tag = self.soup.find(name='div', attrs={'id': 'gs_ab_md'}) + if tag is not None: + raw_text = tag.findAll(text=True) + # raw text is a list because the body contains <b> etc + if raw_text is not None and len(raw_text) > 0: + try: + num_results = raw_text[0].split()[1] + # num_results may now contain commas to separate + # thousands, strip: + num_results = num_results.replace(',', '') + num_results = int(num_results) + self.handle_num_results(num_results) + except (IndexError, ValueError): + pass + + def _parse_article(self, div): + self.article = ScholarArticle() + + for tag in div: + if not hasattr(tag, 'name'): + continue + + if tag.name == 'div' and self._tag_has_class(tag, 'gs_rt') and \ + tag.h3 and tag.h3.a: + self.article['title'] = ''.join(tag.h3.a.findAll(text=True)) + self.article['url'] = self._path2url(tag.h3.a['href']) + if self.article['url'].endswith('.pdf'): + self.article['url_pdf'] = self.article['url'] + + if tag.name == 'font': + for tag2 in tag: + if not hasattr(tag2, 'name'): + continue + if tag2.name == 'span' and \ + self._tag_has_class(tag2, 'gs_fl'): + self._parse_links(tag2) + + def _parse_links(self, span): + for tag in span: + if not hasattr(tag, 'name'): + continue + if tag.name != 'a' or tag.get('href') is None: + continue + + if tag.get('href').startswith('/scholar?cites'): + if hasattr(tag, 'string') and tag.string.startswith('Cited by'): + self.article['num_citations'] = \ + self._as_int(tag.string.split()[-1]) + + # Weird Google Scholar behavior here: if the original + # search query came with a number-of-results limit, + # then this limit gets propagated to the URLs embedded + # in the results page as well. Same applies to + # versions URL in next if-block. + self.article['url_citations'] = \ + self._strip_url_arg('num', self._path2url(tag.get('href'))) + + # We can also extract the cluster ID from the versions + # URL. Note that we know that the string contains "?", + # from the above if-statement. + args = self.article['url_citations'].split('?', 1)[1] + for arg in args.split('&'): + if arg.startswith('cites='): + self.article['cluster_id'] = arg[6:] + + if tag.get('href').startswith('/scholar?cluster'): + if hasattr(tag, 'string') and tag.string.startswith('All '): + self.article['num_versions'] = \ + self._as_int(tag.string.split()[1]) + self.article['url_versions'] = \ + self._strip_url_arg('num', self._path2url(tag.get('href'))) + + if tag.getText().startswith('Import'): + self.article['url_citation'] = self._path2url(tag.get('href')) + + + @staticmethod + def _tag_has_class(tag, klass): + """ + This predicate function checks whether a BeatifulSoup Tag instance + has a class attribute. + """ + res = tag.get('class') or [] + if type(res) != list: + # BeautifulSoup 3 can return e.g. 'gs_md_wp gs_ttss', + # so split -- conveniently produces a list in any case + res = res.split() + return klass in res + + @staticmethod + def _tag_results_checker(tag): + return tag.name == 'div' \ + and ScholarArticleParser._tag_has_class(tag, 'gs_r') + + @staticmethod + def _as_int(obj): + try: + return int(obj) + except ValueError: + return None + + def _path2url(self, path): + """Helper, returns full URL in case path isn't one.""" + if path.startswith('http://'): + return path + if not path.startswith('/'): + path = '/' + path + return self.site + path + + def _strip_url_arg(self, arg, url): + """Helper, removes a URL-encoded argument, if present.""" + parts = url.split('?', 1) + if len(parts) != 2: + return url + res = [] + for part in parts[1].split('&'): + if not part.startswith(arg + '='): + res.append(part) + return parts[0] + '?' + '&'.join(res) + + +class ScholarArticleParser120201(ScholarArticleParser): + """ + This class reflects update to the Scholar results page layout that + Google recently. + """ + def _parse_article(self, div): + self.article = ScholarArticle() + + for tag in div: + if not hasattr(tag, 'name'): + continue + + if tag.name == 'h3' and self._tag_has_class(tag, 'gs_rt') and tag.a: + self.article['title'] = ''.join(tag.a.findAll(text=True)) + self.article['url'] = self._path2url(tag.a['href']) + if self.article['url'].endswith('.pdf'): + self.article['url_pdf'] = self.article['url'] + + if tag.name == 'div' and self._tag_has_class(tag, 'gs_a'): + year = self.year_re.findall(tag.text) + self.article['year'] = year[0] if len(year) > 0 else None + + if tag.name == 'div' and self._tag_has_class(tag, 'gs_fl'): + self._parse_links(tag) + + +class ScholarArticleParser120726(ScholarArticleParser): + """ + This class reflects update to the Scholar results page layout that + Google made 07/26/12. + """ + def _parse_article(self, div): + self.article = ScholarArticle() + + for tag in div: + if not hasattr(tag, 'name'): + continue + if str(tag).lower().find('.pdf'): + if tag.find('div', {'class': 'gs_ttss'}): + self._parse_links(tag.find('div', {'class': 'gs_ttss'})) + + if tag.name == 'div' and self._tag_has_class(tag, 'gs_ri'): + # There are (at least) two formats here. In the first + # one, we have a link, e.g.: + # + # <h3 class="gs_rt"> + # <a href="http://dl.acm.org/citation.cfm?id=972384" class="yC0"> + # <b>Honeycomb</b>: creating intrusion detection signatures using + # honeypots + # </a> + # </h3> + # + # In the other, there's no actual link -- it's what + # Scholar renders as "CITATION" in the HTML: + # + # <h3 class="gs_rt"> + # <span class="gs_ctu"> + # <span class="gs_ct1">[CITATION]</span> + # <span class="gs_ct2">[C]</span> + # </span> + # <b>Honeycomb</b> automated ids signature creation using honeypots + # </h3> + # + # We now distinguish the two. + try: + atag = tag.h3.a + self.article['title'] = ''.join(atag.findAll(text=True)) + self.article['url'] = self._path2url(atag['href']) + if self.article['url'].endswith('.pdf'): + self.article['url_pdf'] = self.article['url'] + except: + # Remove a few spans that have unneeded content (e.g. [CITATION]) + for span in tag.h3.findAll(name='span'): + span.clear() + self.article['title'] = ''.join(tag.h3.findAll(text=True)) + + if tag.find('div', {'class': 'gs_a'}): + year = self.year_re.findall(tag.find('div', {'class': 'gs_a'}).text) + self.article['year'] = year[0] if len(year) > 0 else None + + if tag.find('div', {'class': 'gs_fl'}): + self._parse_links(tag.find('div', {'class': 'gs_fl'})) + + if tag.find('div', {'class': 'gs_rs'}): + # These are the content excerpts rendered into the results. + raw_text = tag.find('div', {'class': 'gs_rs'}).findAll(text=True) + if len(raw_text) > 0: + raw_text = ''.join(raw_text) + raw_text = raw_text.replace('\n', '') + self.article['excerpt'] = raw_text + + +class ScholarQuery(object): + """ + The base class for any kind of results query we send to Scholar. + """ + def __init__(self): + self.url = None + + # The number of results requested from Scholar -- not the + # total number of results it reports (the latter gets stored + # in attrs, see below). + self.num_results = None + + # Queries may have global result attributes, similar to + # per-article attributes in ScholarArticle. The exact set of + # attributes may differ by query type, but they all share the + # basic data structure: + self.attrs = {} + + def set_num_page_results(self, num_page_results): + self.num_results = ScholarUtils.ensure_int( + num_page_results, + 'maximum number of results on page must be numeric') + + def get_url(self): + """ + Returns a complete, submittable URL string for this particular + query instance. The URL and its arguments will vary depending + on the query. + """ + return None + + def _add_attribute_type(self, key, label, default_value=None): + """ + Adds a new type of attribute to the list of attributes + understood by this query. Meant to be used by the constructors + in derived classes. + """ + if len(self.attrs) == 0: + self.attrs[key] = [default_value, label, 0] + return + idx = max([item[2] for item in self.attrs.values()]) + 1 + self.attrs[key] = [default_value, label, idx] + + def __getitem__(self, key): + """Getter for attribute value. Returns None if no such key.""" + if key in self.attrs: + return self.attrs[key][0] + return None + + def __setitem__(self, key, item): + """Setter for attribute value. Does nothing if no such key.""" + if key in self.attrs: + self.attrs[key][0] = item + + def _parenthesize_phrases(self, query): + """ + Turns a query string containing comma-separated phrases into a + space-separated list of tokens, quoted if containing + whitespace. For example, input + + 'some words, foo, bar' + + becomes + + '"some words" foo bar' + + This comes in handy during the composition of certain queries. + """ + if query.find(',') < 0: + return query + phrases = [] + for phrase in query.split(','): + phrase = phrase.strip() + if phrase.find(' ') > 0: + phrase = '"' + phrase + '"' + phrases.append(phrase) + return ' '.join(phrases) + + +class ClusterScholarQuery(ScholarQuery): + """ + This version just pulls up an article cluster whose ID we already + know about. + """ + SCHOLAR_CLUSTER_URL = ScholarConf.SCHOLAR_SITE + '/scholar?' \ + + 'cluster=%(cluster)s' \ + + '%(num)s' + + def __init__(self, cluster=None): + ScholarQuery.__init__(self) + self._add_attribute_type('num_results', 'Results', 0) + self.cluster = None + self.set_cluster(cluster) + + def set_cluster(self, cluster): + """ + Sets search to a Google Scholar results cluster ID. + """ + msg = 'cluster ID must be numeric' + self.cluster = ScholarUtils.ensure_int(cluster, msg) + + def get_url(self): + if self.cluster is None: + raise QueryArgumentError('cluster query needs cluster ID') + + urlargs = {'cluster': self.cluster } + + for key, val in urlargs.items(): + urlargs[key] = quote(encode(val)) + + # The following URL arguments must not be quoted, or the + # server will not recognize them: + urlargs['num'] = ('&num=%d' % self.num_results + if self.num_results is not None else '') + + return self.SCHOLAR_CLUSTER_URL % urlargs + + +class SearchScholarQuery(ScholarQuery): + """ + This version represents the search query parameters the user can + configure on the Scholar website, in the advanced search options. + """ + SCHOLAR_QUERY_URL = ScholarConf.SCHOLAR_SITE + '/scholar?' \ + + 'as_q=%(words)s' \ + + '&as_epq=%(phrase)s' \ + + '&as_oq=%(words_some)s' \ + + '&as_eq=%(words_none)s' \ + + '&as_occt=%(scope)s' \ + + '&as_sauthors=%(authors)s' \ + + '&as_publication=%(pub)s' \ + + '&as_ylo=%(ylo)s' \ + + '&as_yhi=%(yhi)s' \ + + '&as_vis=%(citations)s' \ + + '&btnG=&hl=en' \ + + '%(num)s' \ + + '&as_sdt=%(patents)s%%2C5' + + def __init__(self): + ScholarQuery.__init__(self) + self._add_attribute_type('num_results', 'Results', 0) + self.words = None # The default search behavior + self.words_some = None # At least one of those words + self.words_none = None # None of these words + self.phrase = None + self.scope_title = False # If True, search in title only + self.author = None + self.pub = None + self.timeframe = [None, None] + self.include_patents = True + self.include_citations = True + + def set_words(self, words): + """Sets words that *all* must be found in the result.""" + self.words = words + + def set_words_some(self, words): + """Sets words of which *at least one* must be found in result.""" + self.words_some = words + + def set_words_none(self, words): + """Sets words of which *none* must be found in the result.""" + self.words_none = words + + def set_phrase(self, phrase): + """Sets phrase that must be found in the result exactly.""" + self.phrase = phrase + + def set_scope(self, title_only): + """ + Sets Boolean indicating whether to search entire article or title + only. + """ + self.scope_title = title_only + + def set_author(self, author): + """Sets names that must be on the result's author list.""" + self.author = author + + def set_pub(self, pub): + """Sets the publication in which the result must be found.""" + self.pub = pub + + def set_timeframe(self, start=None, end=None): + """ + Sets timeframe (in years as integer) in which result must have + appeared. It's fine to specify just start or end, or both. + """ + if start: + start = ScholarUtils.ensure_int(start) + if end: + end = ScholarUtils.ensure_int(end) + self.timeframe = [start, end] + + def set_include_citations(self, yesorno): + self.include_citations = yesorno + + def set_include_patents(self, yesorno): + self.include_patents = yesorno + + def get_url(self): + if self.words is None and self.words_some is None \ + and self.words_none is None and self.phrase is None \ + and self.author is None and self.pub is None \ + and self.timeframe[0] is None and self.timeframe[1] is None: + raise QueryArgumentError('search query needs more parameters') + + # If we have some-words or none-words lists, we need to + # process them so GS understands them. For simple + # space-separeted word lists, there's nothing to do. For lists + # of phrases we have to ensure quotations around the phrases, + # separating them by whitespace. + words_some = None + words_none = None + + if self.words_some: + words_some = self._parenthesize_phrases(self.words_some) + if self.words_none: + words_none = self._parenthesize_phrases(self.words_none) + + urlargs = {'words': self.words or '', + 'words_some': words_some or '', + 'words_none': words_none or '', + 'phrase': self.phrase or '', + 'scope': 'title' if self.scope_title else 'any', + 'authors': self.author or '', + 'pub': self.pub or '', + 'ylo': self.timeframe[0] or '', + 'yhi': self.timeframe[1] or '', + 'patents': '0' if self.include_patents else '1', + 'citations': '0' if self.include_citations else '1'} + + for key, val in urlargs.items(): + urlargs[key] = quote(encode(val)) + + # The following URL arguments must not be quoted, or the + # server will not recognize them: + urlargs['num'] = ('&num=%d' % self.num_results + if self.num_results is not None else '') + + return self.SCHOLAR_QUERY_URL % urlargs + + +class ScholarSettings(object): + """ + This class lets you adjust the Scholar settings for your + session. It's intended to mirror the features tunable in the + Scholar Settings pane, but right now it's a bit basic. + """ + CITFORM_NONE = 0 + CITFORM_REFWORKS = 1 + CITFORM_REFMAN = 2 + CITFORM_ENDNOTE = 3 + CITFORM_BIBTEX = 4 + + def __init__(self): + self.citform = 0 # Citation format, default none + self.per_page_results = None + self._is_configured = False + + def set_citation_format(self, citform): + citform = ScholarUtils.ensure_int(citform) + if citform < 0 or citform > self.CITFORM_BIBTEX: + raise FormatError('citation format invalid, is "%s"' + % citform) + self.citform = citform + self._is_configured = True + + def set_per_page_results(self, per_page_results): + self.per_page_results = ScholarUtils.ensure_int( + per_page_results, 'page results must be integer') + self.per_page_results = min( + self.per_page_results, ScholarConf.MAX_PAGE_RESULTS) + self._is_configured = True + + def is_configured(self): + return self._is_configured + + +class ScholarQuerier(object): + """ + ScholarQuerier instances can conduct a search on Google Scholar + with subsequent parsing of the resulting HTML content. The + articles found are collected in the articles member, a list of + ScholarArticle instances. + """ + + # Default URLs for visiting and submitting Settings pane, as of 3/14 + GET_SETTINGS_URL = ScholarConf.SCHOLAR_SITE + '/scholar_settings?' \ + + 'sciifh=1&hl=en&as_sdt=0,5' + + SET_SETTINGS_URL = ScholarConf.SCHOLAR_SITE + '/scholar_setprefs?' \ + + 'q=' \ + + '&scisig=%(scisig)s' \ + + '&inststart=0' \ + + '&as_sdt=1,5' \ + + '&as_sdtp=' \ + + '&num=%(num)s' \ + + '&scis=%(scis)s' \ + + '%(scisf)s' \ + + '&hl=en&lang=all&instq=&inst=569367360547434339&save=' + + # Older URLs: + # ScholarConf.SCHOLAR_SITE + '/scholar?q=%s&hl=en&btnG=Search&as_sdt=2001&as_sdtp=on + + class Parser(ScholarArticleParser120726): + def __init__(self, querier): + ScholarArticleParser120726.__init__(self) + self.querier = querier + + def handle_num_results(self, num_results): + if self.querier is not None and self.querier.query is not None: + self.querier.query['num_results'] = num_results + + def handle_article(self, art): + self.querier.add_article(art) + + def __init__(self): + self.articles = [] + self.query = None + self.cjar = MozillaCookieJar() + + # If we have a cookie file, load it: + if ScholarConf.COOKIE_JAR_FILE and \ + os.path.exists(ScholarConf.COOKIE_JAR_FILE): + try: + self.cjar.load(ScholarConf.COOKIE_JAR_FILE, + ignore_discard=True) + ScholarUtils.log('info', 'loaded cookies file') + except Exception as msg: + ScholarUtils.log('warn', 'could not load cookies file: %s' % msg) + self.cjar = MozillaCookieJar() # Just to be safe + + self.opener = build_opener(HTTPCookieProcessor(self.cjar)) + self.settings = None # Last settings object, if any + + def apply_settings(self, settings): + """ + Applies settings as provided by a ScholarSettings instance. + """ + if settings is None or not settings.is_configured(): + return True + + self.settings = settings + + # This is a bit of work. We need to actually retrieve the + # contents of the Settings pane HTML in order to extract + # hidden fields before we can compose the query for updating + # the settings. + html = self._get_http_response(url=self.GET_SETTINGS_URL, + log_msg='dump of settings form HTML', + err_msg='requesting settings failed') + if html is None: + return False + + # Now parse the required stuff out of the form. We require the + # "scisig" token to make the upload of our settings acceptable + # to Google. + soup = SoupKitchen.make_soup(html) + + tag = soup.find(name='form', attrs={'id': 'gs_settings_form'}) + if tag is None: + ScholarUtils.log('info', 'parsing settings failed: no form') + return False + + tag = tag.find('input', attrs={'type':'hidden', 'name':'scisig'}) + if tag is None: + ScholarUtils.log('info', 'parsing settings failed: scisig') + return False + + urlargs = {'scisig': tag['value'], + 'num': settings.per_page_results, + 'scis': 'no', + 'scisf': ''} + + if settings.citform != 0: + urlargs['scis'] = 'yes' + urlargs['scisf'] = '&scisf=%d' % settings.citform + + html = self._get_http_response(url=self.SET_SETTINGS_URL % urlargs, + log_msg='dump of settings result HTML', + err_msg='applying setttings failed') + if html is None: + return False + + ScholarUtils.log('info', 'settings applied') + return True + + def send_query(self, query): + """ + This method initiates a search query (a ScholarQuery instance) + with subsequent parsing of the response. + """ + self.clear_articles() + self.query = query + + html = self._get_http_response(url=query.get_url(), + log_msg='dump of query response HTML', + err_msg='results retrieval failed') + if html is None: + return + + self.parse(html) + + def get_citation_data(self, article): + """ + Given an article, retrieves citation link. Note, this requires that + you adjusted the settings to tell Google Scholar to actually + provide this information, *prior* to retrieving the article. + """ + if article['url_citation'] is None: + return False + if article.citation_data is not None: + return True + + ScholarUtils.log('info', 'retrieving citation export data') + data = self._get_http_response(url=article['url_citation'], + log_msg='citation data response', + err_msg='requesting citation data failed') + if data is None: + return False + + article.set_citation_data(data) + return True + + def parse(self, html): + """ + This method allows parsing of provided HTML content. + """ + parser = self.Parser(self) + parser.parse(html) + + def add_article(self, art): + self.get_citation_data(art) + self.articles.append(art) + + def clear_articles(self): + """Clears any existing articles stored from previous queries.""" + self.articles = [] + + def save_cookies(self): + """ + This stores the latest cookies we're using to disk, for reuse in a + later session. + """ + if ScholarConf.COOKIE_JAR_FILE is None: + return False + try: + self.cjar.save(ScholarConf.COOKIE_JAR_FILE, + ignore_discard=True) + ScholarUtils.log('info', 'saved cookies file') + return True + except Exception as msg: + ScholarUtils.log('warn', 'could not save cookies file: %s' % msg) + return False + + def _get_http_response(self, url, log_msg=None, err_msg=None): + """ + Helper method, sends HTTP request and returns response payload. + """ + if log_msg is None: + log_msg = 'HTTP response data follow' + if err_msg is None: + err_msg = 'request failed' + try: + ScholarUtils.log('info', 'requesting %s' % unquote(url)) + + req = Request(url=url, headers={'User-Agent': ScholarConf.USER_AGENT}) + hdl = self.opener.open(req) + html = hdl.read() + + ScholarUtils.log('debug', log_msg) + ScholarUtils.log('debug', '>>>>' + '-'*68) + ScholarUtils.log('debug', 'url: %s' % hdl.geturl()) + ScholarUtils.log('debug', 'result: %s' % hdl.getcode()) + ScholarUtils.log('debug', 'headers:\n' + str(hdl.info())) + ScholarUtils.log('debug', 'data:\n' + html.decode('utf-8')) # For Python 3 + ScholarUtils.log('debug', '<<<<' + '-'*68) + + return html + except Exception as err: + ScholarUtils.log('info', err_msg + ': %s' % err) + return None + + +def txt(querier, with_globals): + if with_globals: + # If we have any articles, check their attribute labels to get + # the maximum length -- makes for nicer alignment. + max_label_len = 0 + if len(querier.articles) > 0: + items = sorted(list(querier.articles[0].attrs.values()), + key=lambda item: item[2]) + max_label_len = max([len(str(item[1])) for item in items]) + + # Get items sorted in specified order: + items = sorted(list(querier.query.attrs.values()), key=lambda item: item[2]) + # Find largest label length: + max_label_len = max([len(str(item[1])) for item in items] + [max_label_len]) + fmt = '[G] %%%ds %%s' % max(0, max_label_len-4) + for item in items: + if item[0] is not None: + print(fmt % (item[1], item[0])) + if len(items) > 0: + print + + articles = querier.articles + for art in articles: + print(encode(art.as_txt()) + '\n') + +def csv(querier, header=False, sep='|'): + articles = querier.articles + for art in articles: + result = art.as_csv(header=header, sep=sep) + print(encode(result)) + header = False + +def citation_export(querier): + articles = querier.articles + for art in articles: + print(art.as_citation() + '\n') + + +def main(): + usage = """scholar.py [options] <query string> +A command-line interface to Google Scholar. + +Examples: + +# Retrieve one article written by Einstein on quantum theory: +scholar.py -c 1 --author "albert einstein" --phrase "quantum theory" + +# Retrieve a BibTeX entry for that quantum theory paper: +scholar.py -c 1 -C 17749203648027613321 --citation bt + +# Retrieve five articles written by Einstein after 1970 where the title +# does not contain the words "quantum" and "theory": +scholar.py -c 5 -a "albert einstein" -t --none "quantum theory" --after 1970""" + + fmt = optparse.IndentedHelpFormatter(max_help_position=50, width=100) + parser = optparse.OptionParser(usage=usage, formatter=fmt) + group = optparse.OptionGroup(parser, 'Query arguments', + 'These options define search query arguments and parameters.') + group.add_option('-a', '--author', metavar='AUTHORS', default=None, + help='Author name(s)') + group.add_option('-A', '--all', metavar='WORDS', default=None, dest='allw', + help='Results must contain all of these words') + group.add_option('-s', '--some', metavar='WORDS', default=None, + help='Results must contain at least one of these words. Pass arguments in form -s "foo bar baz" for simple words, and -s "a phrase, another phrase" for phrases') + group.add_option('-n', '--none', metavar='WORDS', default=None, + help='Results must contain none of these words. See -s|--some re. formatting') + group.add_option('-p', '--phrase', metavar='PHRASE', default=None, + help='Results must contain exact phrase') + group.add_option('-t', '--title-only', action='store_true', default=False, + help='Search title only') + group.add_option('-P', '--pub', metavar='PUBLICATIONS', default=None, + help='Results must have appeared in this publication') + group.add_option('--after', metavar='YEAR', default=None, + help='Results must have appeared in or after given year') + group.add_option('--before', metavar='YEAR', default=None, + help='Results must have appeared in or before given year') + group.add_option('--no-patents', action='store_true', default=False, + help='Do not include patents in results') + group.add_option('--no-citations', action='store_true', default=False, + help='Do not include citations in results') + group.add_option('-C', '--cluster-id', metavar='CLUSTER_ID', default=None, + help='Do not search, just use articles in given cluster ID') + group.add_option('-c', '--count', type='int', default=None, + help='Maximum number of results') + parser.add_option_group(group) + + group = optparse.OptionGroup(parser, 'Output format', + 'These options control the appearance of the results.') + group.add_option('--txt', action='store_true', + help='Print article data in text format (default)') + group.add_option('--txt-globals', action='store_true', + help='Like --txt, but first print global results too') + group.add_option('--csv', action='store_true', + help='Print article data in CSV form (separator is "|")') + group.add_option('--csv-header', action='store_true', + help='Like --csv, but print header with column names') + group.add_option('--citation', metavar='FORMAT', default=None, + help='Print article details in standard citation format. Argument Must be one of "bt" (BibTeX), "en" (EndNote), "rm" (RefMan), or "rw" (RefWorks).') + parser.add_option_group(group) + + group = optparse.OptionGroup(parser, 'Miscellaneous') + group.add_option('--cookie-file', metavar='FILE', default=None, + help='File to use for cookie storage. If given, will read any existing cookies if found at startup, and save resulting cookies in the end.') + group.add_option('-d', '--debug', action='count', default=0, + help='Enable verbose logging to stderr. Repeated options increase detail of debug output.') + group.add_option('-v', '--version', action='store_true', default=False, + help='Show version information') + parser.add_option_group(group) + + options, _ = parser.parse_args() + + # Show help if we have neither keyword search nor author name + if len(sys.argv) == 1: + parser.print_help() + return 1 + + if options.debug > 0: + options.debug = min(options.debug, ScholarUtils.LOG_LEVELS['debug']) + ScholarConf.LOG_LEVEL = options.debug + ScholarUtils.log('info', 'using log level %d' % ScholarConf.LOG_LEVEL) + + if options.version: + print('This is scholar.py %s.' % ScholarConf.VERSION) + return 0 + + if options.cookie_file: + ScholarConf.COOKIE_JAR_FILE = options.cookie_file + + # Sanity-check the options: if they include a cluster ID query, it + # makes no sense to have search arguments: + if options.cluster_id is not None: + if options.author or options.allw or options.some or options.none \ + or options.phrase or options.title_only or options.pub \ + or options.after or options.before: + print('Cluster ID queries do not allow additional search arguments.') + return 1 + + querier = ScholarQuerier() + settings = ScholarSettings() + + if options.citation == 'bt': + settings.set_citation_format(ScholarSettings.CITFORM_BIBTEX) + elif options.citation == 'en': + settings.set_citation_format(ScholarSettings.CITFORM_ENDNOTE) + elif options.citation == 'rm': + settings.set_citation_format(ScholarSettings.CITFORM_REFMAN) + elif options.citation == 'rw': + settings.set_citation_format(ScholarSettings.CITFORM_REFWORKS) + elif options.citation is not None: + print('Invalid citation link format, must be one of "bt", "en", "rm", or "rw".') + return 1 + + querier.apply_settings(settings) + + if options.cluster_id: + query = ClusterScholarQuery(cluster=options.cluster_id) + else: + query = SearchScholarQuery() + if options.author: + query.set_author(options.author) + if options.allw: + query.set_words(options.allw) + if options.some: + query.set_words_some(options.some) + if options.none: + query.set_words_none(options.none) + if options.phrase: + query.set_phrase(options.phrase) + if options.title_only: + query.set_scope(True) + if options.pub: + query.set_pub(options.pub) + if options.after or options.before: + query.set_timeframe(options.after, options.before) + if options.no_patents: + query.set_include_patents(False) + if options.no_citations: + query.set_include_citations(False) + + if options.count is not None: + options.count = min(options.count, ScholarConf.MAX_PAGE_RESULTS) + query.set_num_page_results(options.count) + + querier.send_query(query) + + if options.csv: + csv(querier) + elif options.csv_header: + csv(querier, header=True) + elif options.citation is not None: + citation_export(querier) + else: + txt(querier, with_globals=options.txt_globals) + + if options.cookie_file: + querier.save_cookies() + + return 0 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scrape.py b/scrape.py index 1a3cd76f4d06501b53d0074f653e0992e4dcf451..33c5530c360f4e18a10f9dc258057d177739d63f 100644 --- a/scrape.py +++ b/scrape.py @@ -24,14 +24,18 @@ from pdfminer.pdfdevice import PDFDevice from pdfminer.layout import LAParams from pdfminer.converter import TextConverter +import os +import sys, getopt +from io import StringIO + + from crawl import convert_pdf_to_txt from crawl import print_best_text from crawl import collect_pubs -import scholar_scrape.scholar as scholar -#scholar = scholar_scrape.scholar +import scholar -from delver import Crawler -C = Crawler() +#from delver import Crawler +#C = Crawler() import requests @@ -39,14 +43,9 @@ import io import selenium -from selenium import webdriver -#from pyvirtualdisplay import Display - -#display = Display(visible=0, size=(1024, 768)) -#display.start() -from selenium.webdriver.firefox.options import Options +#from selenium.webdriver.firefox.options import Options import re from bs4 import BeautifulSoup @@ -54,19 +53,48 @@ import bs4 as bs import urllib.request from io import StringIO import io - - -#options = Options() -#options.headless = True -chrome_options = webdriver.ChromeOptions() -chrome_options.add_argument('--no-sandbox') -chrome_options.add_argument('--headless') -chrome_options.add_argument('--disable-gpu') -driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver',chrome_options=chrome_options) -#driver = webdriver.Chrome(chrome_options=chrome_options) -driver.implicitly_wait(10) +from selenium import webdriver +from selenium.webdriver.firefox.options import Options from selenium.common.exceptions import NoSuchElementException +import os +def get_driver(): + options = Options() + options.add_argument("--headless") + options.add_argument("--disable-dev-shm-usage") + options.add_argument("--no-sandbox") + try: + driver = webdriver.Firefox(options=options) + except: + try: + options.binary_location = "/app/vendor/firefox/firefox" + driver = webdriver.Firefox(options=options) + GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver") + driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH) + except: + try: + chrome_options = webdriver.ChromeOptions() + chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") + chrome_options.add_argument("--headless") + chrome_options.add_argument("--disable-dev-shm-usage") + chrome_options.add_argument("--no-sandbox") + driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options) + except: + try: + GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver") + options.binary_location = str('./firefox') + driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH) + except: + os.system("wget wget https://ftp.mozilla.org/pub/firefox/releases/45.0.2/linux-x86_64/en-GB/firefox-45.0.2.tar.bz2") + os.system("wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz") + os.system("tar -xf geckodriver-v0.26.0-linux64.tar.gz") + os.system("tar xvf firefox-45.0.2.tar.bz2") + GECKODRIVER_PATH=str(os.getcwd())+str("/geckodriver") + options.binary_location = str('./firefox') + driver = webdriver.Firefox(options=options,executable_path=GECKODRIVER_PATH) + return driver + +driver = get_driver() rsrcmgr = PDFResourceManager() @@ -77,31 +105,13 @@ device = TextConverter(rsrcmgr, retstr, laparams = laparams) interpreter = PDFPageInterpreter(rsrcmgr, device) - - -#from pyPdf import PdfFileReader - -#from StringIO import StringIO - -from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter -from pdfminer.converter import TextConverter -from pdfminer.layout import LAParams -from pdfminer.pdfpage import PDFPage -import os -import sys, getopt -from io import StringIO - #converts pdf, returns its text content as a string def pdf_to_txt_(infile):#, pages=None): - #if not pages: - #pagenums = set() - output = StringIO() manager = PDFResourceManager() converter = TextConverter(manager, output, laparams=LAParams()) interpreter = PDFPageInterpreter(manager, converter) - #infile = file(fname, 'rb') for page in PDFPage.get_pages(infile, pagenums): interpreter.process_page(page) infile.close() @@ -114,10 +124,6 @@ def pdf_to_txt_(infile):#, pages=None): import PyPDF2 from PyPDF2 import PdfFileReader -#mport textract - -#from nltk.tokenize import word_tokenize -#from nltk.corpus import stopwords def pdf_to_txt(url): @@ -145,16 +151,6 @@ def pdf_to_txt(url): else: text = textract.process(fileurl, method='tesseract', language='eng') return text - ''' - parser = PDFParser(pdf) - document = PDFDocument(parser, password=None) - write_text = '' - for page in PDFPage.create_pages(document): - interpreter.process_page(page) - write_text = write_text.join(retstr.getvalue()) - - text = str(write_text) - ''' def html_to_txt(content): soup = BeautifulSoup(content, 'html.parser') diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000000000000000000000000000000000000..10e53595f2d3ca4924507d3cef0aeda1071a0c2b --- /dev/null +++ b/setup.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# https://gist.github.com/mikesmullin/2636776 +# +# download and install latest geckodriver for linux or mac. +# required for selenium to drive a firefox browser. +sudo apt-get update +sudo apt-get install jq wget chromium-chromedriver firefox + + +sudo python3 -m pip install -r requirements.txt +sudo python3 -m pip install seaborn +sudo python3 -m pip install bs4 +sudo python3 -m pip install natsort dask plotly tabulate +sudo python3 -c "import nltk; nltk.download('punkt')" +sudo python3 -c "import nltk; nltk.download('stopwords')" +sudo conda install -c plotly plotly=4.8.1 +#git clone https://github.com/ckreibich/scholar.py.git + +wget https://www.dropbox.com/s/3h12l5y2pn49c80/traingDats.p?dl=0 +wget https://www.dropbox.com/s/crarli3772rf3lj/more_authors_results.p?dl=0 +wget https://www.dropbox.com/s/x66zf52himmp5ox/benchmarks.p?dl=0 +# sudo apt-get install -y firefox +#wget https://ftp.mozilla.org/pub/firefox/releases/45.0.2/linux-x86_64/en-GB/firefox-45.0.2.tar.bz2 + +sudo python3 align_data_sources.py + +mkdir -p ~/.streamlit/ +echo "\ +[general]\n\ +email = \"rjjarvis@asu.edu\"\n\ +" > ~/.streamlit/credentials.toml +echo "\ +[server]\n\ +headless = true\n\ +enableCORS=false\n\ +port = $PORT\n\ +" > ~/.streamlit/config.toml + + diff --git a/t_analysis.py b/t_analysis.py index edf6a15c95ce3c1d556c605a931c7c752a2e7a42..3718cb0acea35b4c69126bf1fd3880e4e222095a 100644 --- a/t_analysis.py +++ b/t_analysis.py @@ -17,8 +17,8 @@ import sys import time import collections -import matplotlib # Its not that this file is responsible for doing plotting, but it calls many modules that are, such that it needs to pre-empt -matplotlib.use('Agg') +#import matplotlib # Its not that this file is responsible for doing plotting, but it calls many modules that are, such that it needs to pre-empt +#matplotlib.use('Agg') import numpy as np import pandas as pd @@ -32,7 +32,7 @@ import nltk # english_check from utils import (black_string, clue_links, clue_words, comp_ratio, publication_check) -from tabulate import tabulate +#from tabulate import tabulate from textblob import TextBlob from textstat.textstat import textstat tagger = PerceptronTagger(load=False) @@ -230,10 +230,11 @@ def text_proc(corpus, urlDat = {}, WORD_LIM = 100): return urlDat +from tqdm import tqdm def process_dics(urlDats): dfs = [] - for urlDat in urlDats: + for urlDat in tqdm(urlDats): # pandas Data frames are best data container for maths/stats, but steep learning curve. # Other exclusion criteria. Exclude reading levels above grade 100, # as this is most likely a problem with the metric algorithm, and or rubbish data in. diff --git a/traingDats.p b/traingDats.p new file mode 100644 index 0000000000000000000000000000000000000000..1c7c8c7d05b5464e86c3f9e678d009a6bc0c557f Binary files /dev/null and b/traingDats.p differ