Skip to content

Python code for construction and analysis of semantic networks from text.

License

Notifications You must be signed in to change notification settings

nhchristianson/Math-text-semantic-networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Networks in Mathematics Texts

This repository contains code associated with the paper

Nicolas H. Christianson, Ann Sizemore Blevins, and Danielle S. Bassett (2020)
Architecture and evolution of semantic networks in mathematics texts
Proc. R. Soc. A. 476: 20190741.

In particular, it contains tools for the construction and analysis of semantic networks from mathematics textbooks, as well as Jupyter notebooks detailing the production of the results included in the aforementioned paper. The methodology is designed to be broadly applicable to any text, expository or otherwise, with some small modifications. If you find this code useful in your research, please consider citing our paper; a BibTeX citation is given in CITATION.bib.

Requirements

This code is tested on Python 3.7, but may work in other versions of Python 3.

In order to do spell-checking via pyenchant, it will be necessary on non-Windows platforms to install the underlying "enchant" library, e.g. via Homebrew on Mac OS.

A few Python packages are not strictly necessary for things to work, but may be useful:

  • dionysus, a persistent homology package. This is not the package we generally use for calculating the persistent homology of growing semantic networks (which is ripser.py), but it may be useful in conjunction with:
  • cyclonysus, which wraps dionysus and enables the extraction of representative cycles from persistent homology, useful for visualizing the "knowledge gaps" extracted from a growing semantic network.
  • graph-tool, which enables construction and analysis of graphs and much more; our paper's results use its graph plotting functionality.

All other necessary packages will be installed as dependencies by pip.

Installation

Download this repository, navigate into the folder, and run pip install ..

Examples

The Notebooks folder contains as examples the Jupyter notebooks used to generate the results from our paper.

License

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0