natestemen / mathdb

0 stars 0 forks source link

find some open source textbooks #1

Open natestemen opened 5 years ago

natestemen commented 5 years ago

we need some open source textbook we can start to scrape theorems/definitions from.

how do we feel about scraping from proofwiki also?

natestemen commented 5 years ago

Analysis

In hopes of not having to scrape data from pdf's, I've emailed the authors of all the books to see if they will provide the source code from their project.

natestemen commented 5 years ago

in general:

seem to be pretty good.

Shearyar commented 5 years ago

Found the latex source code for the open source Trench real analysis textbook. TRENCH_REAL_ANALYSIS (1).zip

Shearyar commented 5 years ago

https://digitalcommons.trinity.edu/mono/7/

Shearyar commented 5 years ago

realTheorems.txt

Shearyar commented 5 years ago
import re
def theoremGetter():
    theoremLi = []
    fh = open("TRENCH_REAL_ANALYSIS.tex.txt", "r")
    textString = fh.read()
    fh.close()
    theorems = re.findall(r'begin{theorem}(.*?)\\end{theorem}',textString, re.S)
    return theorems

theorems = theoremGetter()

fh = open("realTheorems.txt", "w")
count = 1
for i in theorems:
    fh.write("Theorem " + str(count) + ":\n")
    fh.write(i)
    fh.write("\n")
    count +=1

fh.close()
Shearyar commented 5 years ago

realTheorems.txt

Shearyar commented 5 years ago

The one above actually compiles in Latex: https://www.overleaf.com/project/5c6caec3a2b08f6c9c112121