Windows Installation Procedure
getpapers
- Download Node.Js from here.
- Open the windows command prompt by pressing Win-R and typing
cmd
- type npm install –global getpapers
norma
Check you have a recent version of java (at least 1.7).
You can test this by running java -version
at the terminal/command prompt. Up to date versions can be found to download from Oracle or OpenJDK. Either will work for ContentMine.
Using chocolatey
The preferred installation method is using chocolatey:
If you don’t have chocolatey installed you should do so with:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install norma -s https://www.myget.org/F/contentmine/api/v2 -y
To update to a new version run:
choco upgrade norma -s https://www.myget.org/F/contentmine/api/v2 -y
Alternate method from zip
There are binary installers available from these sources 1. Download the latest zip binary release from github (the .zip) 1. unzip all files to somewhere convenient 1. Add the bin directory that you unzipped to your path
ami
Check you have a recent version of java (at least 1.7).
You can test this by running java -version
at the terminal/command prompt. Up to date versions can be found to download from Oracle or OpenJDK. Either will work for ContentMine.
Using chocolatey
The preferred installation method is using chocolatey:
If you don’t have chocolatey installed you should do so with:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install ami -s https://www.myget.org/F/contentmine/api/v2 -y
To update to a new version run:
choco upgrade ami -s https://www.myget.org/F/contentmine/api/v2 -y
Alternate method from zip
There are binary installers available from these sources
- Download the latest binary release from github (the .zip) here
- unzip all files to somewhere convenient
- Add the bin directory that you unzipped to your path
Windows Operating Procedure
getpapers
Detailed instructions can be found in our workshop-resources.
To get started and download a set of FullText XML files of OpenAccess papers from EuropePMC just run:
You might get back many thousands of results, you can cancel with Ctrl-C.
getpapers -q <your query> -o <a folder to save them in> -x
If you look inside the folder you’ll see there are many more folders; each of which contain a fulltext.xml file which is the contents of that paper.
For example if you run getpapers -q aardvark -o aardvark -x
You’ll get ca. 110 XML files.
norma
If you’re only working on papers form EuropePMC downloaded with getpapers you might not need to run norma seperately. See the ami instructions below.
Detailed instructions can be found in our workshop-resources
To convert the papers into a form we can mine use Norma.
norma --project <your folder of papers> -i fulltext.xml -o scholarly.html --transform nlm2html
ami
Detailed instructions can be found at github
You can actually run ami without calling norma first if you’re just using xml papers downloaded from EuropePMC.
To run a default set of plugins simply type:
cmine <folder name>
This will give you html results tables in the project folder.
To add your own dictionaries use something of the form:
cmine <folder name> word(search)w.search:/org/xmlcml/ami2/plugins/dictionary/tropicalVirus.xml