Skip to content
VAISHALI ARORA edited this page Jul 10, 2020 · 21 revisions

installation

There are two methods. If you are developing ami3 you should use the first. If you are doing production runs and not Maven-savvy then use the second JAR-file route

maven / IDE

If you can compile and run under maven and/or Eclipse/IntelliJ/Netbeans that's the most powerful way.

There are a lot of tests and a lot of them are out of date and fail, so we suggest

git clone https://github.com/petermr/ami3.git
cd ami3
mvn install -Dmaven.test.skip=true 

That will build ami3/target/appassembler/bin and ami3/target/appassembler/repo The exes are in the first. If your PATH contains this, then you can run ami commands. My path includes:

/Users/pm286/workspace/cmdev/ami3/target/appassembler/bin/

(Note that if you rebuild with maven or maven clean this dir gets wiped and overwritten by a new version.)

Single JAR method

Download the latest JAR from https://github.com/petermr/ami-jars3 NOTE CHANGED REPO. They are in dated directories, probably every few days. Use new ones if bugs are fixed or new features are added that you need.

General instructions.

see https://github.com/petermr/tigr2ess/blob/master/installation/INSTALLATION.md

This is a year old. It should be roughly accurate. PLEASE copy to openVirus and update if necessary

Alpha Tester:

Name: Ambreen Hamadani

Installation

  1. Downloaded and installed JDK from Oracle(https://www.oracle.com/java/technologies/javase-jdk14-downloads.html)
  2. Downloaded and installed maven (https://maven.apache.org/install.html)
  3. Cloned the ami3 from Github and added it to path as suggested above.
  4. Tested its installation by running ami --help
  5. Installation successful (0 errors, 0 warnings)

Usage

Reference Tutorial](https://github.com/petermr/openVirus/blob/master/examples/n95/OVERVIEW.md)

  1. An attempt was made to run ami3 on 100 viral epidemic papers using country disease funders dictionaries.
  2. getpapers was used to create directory and the respository of papers: getpapers -q "viral epidemics" -o ami_test_1 -f v_epid/log.txt -x -p -k 100
  3. The directory, ami_test_1 was used as CProject directory for ami3: ami -p ami_test_1 search --dictionary country disease funders
  4. 17 new files got created within ami_test_1 ( 12 XML, 1 folder, 4 HTML)
  5. 0 Errors, multiple warnings like: Warning at procedure xsl:unnamed on line 0 XTDE0540 Ambiguous rule match for /article/front[1]/journal-meta[1]

Tester 2

Name: Kareena Singh

Steps of installation

1. Install Java

  • You can download and install java using https://java.com/en/download/
  • Make sure you have the latest version, in my case version 1.8
  • Test the installation by giving the command java -version in your command prompt and you will get java version "1.8.0_251"

2. Install latest JDK

3. Install git

  • Download and install latest git using https://git-scm.com/downloads
  • Launch git bash
  • Test the installation by giving the command git -version in your command prompt and you will get git version 2.27.0.windows.1

4. Install maven

  • Download and install maven using https://maven.apache.org/install.html
  • Extract all files
  • Set path variable
  • Test installation using mvn -version and you will get apache maven version 3.6.3
  1. Open your command prompt and enter the following commands
git clone https://github.com/petermr/ami3.git
cd ami3
mvn install -Dmaven.test.skip=true 

This will let you install and build ami

  • Test your installation using ami --help and you will get:
C:\Users\Kareena\Desktop\openVirus\cmder
λ ami --help
Usage: ami [OPTIONS] COMMAND

`ami` is a command suite for managing (scholarly) documents: download, aggregate, transform, search, filter, index, annotate, re-use and republish.
It caters for a wide range of inputs (including some awful ones), and creates de facto semantics and an ontology (based on Wikidata).
`ami` is the basis for high-level science/tech applications including chemistry (molecules, spectra, reaction), Forest plots (metaanalyses of trials), phylogenetic
trees (useful for virus mutations), geographic maps, and basic plots (x/y, scatter, etc.).

Parameters:
===========
      [@<filename>...]       One or more argument files containing options.
Options:
========
  -h, --help                 Show this help message and exit.
  -V, --version              Print version information and exit.
  -p, --cproject=DIR         The CProject (directory) to process. This can be (a) a child directory of cwd (current working directory (b) cwd itself (use -p .) or (c)
                               an absolute filename. No defaults. The cProject name is the basename of the file.

Issues faced during installation

  1. Error: 'ami' is not recognized as an internal or external command, operable program or batch file.
  • Make sure you have set path variables for jdk, maven and contentmine using the above links.

Usage of ami

  1. getpapers was used to create directory/folder and the repository of papers getpapers -q "viral epidemics" -o ami_test_2 -f v_epid/log.txt -x -p -k 100
  • This will create a CProject directory named as "ami_test_2"
  1. Now to search about your dictionary you can enter ami -p ami_test_2 search --dictionary viruses
  2. Output- 82 files created under the directory "ami_test_2" containing pdf, xml and images about my dictionary search All downloads succeeded.

Tester 3

NAME : LAKSHMI DEVI PRIYA

OPERATING SYSTEM : Windows 10 PRO

INSTALLATION OF AMI

  • JAVA

Download and install from https://java.com/en/download/ Check its installtion using java -version in command prompt. In my case version 1.8

  • JDK

Download and install the latest version of JDK for your OS from https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html . In my case version 14.0.1. Set the path in the system variable for JDK, appropriate to the directory that is stored in your system. In my case c:\Program Files\Java\jdk-14.0.1\bin

  • Maven

Download and install from https://maven.apache.org/install.html Set the path variable for maven appropriate to the directory that is stored in your system. In my case c:\Program Files\apache-maven-3.6.3\bin Check its installation using mvn -v in the command prompt.

  • git

Download and install git from https://git-scm.com/downloads and launch dit bash. Check its installation using git -version in the command prompt. In my case git 2.27.0 Windows.1

  • Now open your command prompt and give the commands step by step
git clone https://github.com/petermr/ami3.git
cd ami3
mvn install -Dmaven.test.skip=true

After the final command, I got

[...]
[INFO] Installing C:\Users\Desktop\ami3\pom.xml to C:\Users\.m2\repository\org\contentmine\ami3\0.1-SNAPSHOT\ami3-0.1-SNAPSHOT.pom
[INFO] Installing C:\Users\Desktop\ami3\target\ami3-0.1-SNAPSHOT-jar-with-dependencies.jar to C:\Users\.m2\repository\org\contentmine\ami3\0.1-SNAPSHOT\ami3-0.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] -------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------------
[INFO] Total time: 03:21 min
[INFO] Finished at: 2020-06-13T36+05:30
[INFO] -------------------------------------------------------------

The ami system is installed. Check its installation using the command in new command prmpt ami --help and if ami is installed the commands to be used for ami are listed.

ERROR (issues faced)

While using git clone https://github.com/petermr/ami3.git

Cloning into ami3...
remote : Enumerate objects: 1936, done
remote : Counting objects: 100% (1936/1936), done.
remote : Compressing objects: 100% (1155/1155), done.
error: RPC failed; curl 18 transfer closed with outstanding read data
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

This is due to low network connectivity on large repo cloning. So use step by step the following commands:

git clone https://github.com/petermr/ami3 --depth 1
cd ami3
git fetch --unshallow

USING AMI

getpapers is used to create the CProject directory, Ctree folders and download the files with respect to the query. I used the query "face mask"

getpapers -q "face mask" -o ami_test_3 -f fm/log.txt -k 100 -x -p

CProject- ami_test_3 ; Ctree- the folders created inside CProject naming such as PMC7254130, PMC7255150,etc.

Found 18785 Open Access Results. Limited to 100 folders. All the Ctree folders contained .xml files. 100 XML Files downloaded. Elapsed time- 35.4s. But not all Ctree folders contain .pdf files. Only 78 PDF Files downloaded. Elapsed time- 535.3s

ami manages and searches the documents using the builtin dictionaries

 ami -p ami_test_3 search --dictionary diseases funders

9 XML Files were created. dataTables on commenest, count, entries and full were created. A file cooccurence was created. Many WARNINGS popped up.

ERROR (issues faced)

While giving, ami -p ami_test_3 search --dictionary disease funders command

Generic Values (AMISearchTool)
==============================
not found: cProject must be existing directory or have directory parent: ve (C:\WINDOWS\system32\ve
***********************
WARNING: CProject directory does nor exist
***********************
-v to see generic values
[...]

This is due to the difference of the directory in the ami3 repo and the folder created. Give the correct directory with respect to your path variable and the repo.

Tester 4: Vaishali Arora

Operating System: Windows 10

Pre-installations required: Jdk, Maven, Git

1. Installation of Jdk:

Reference: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html Check for installation in Command Prompt: java -version

2. Installation of Maven:

Reference: https://maven.apache.org/install.html Check for installation in Command Prompt: mvn -version

3. Installation of Git:

Launch GitBash Reference: https://git-scm.com/downloads Check in Command Prompt: git -version

4. Open your Command Prompt and type:

    `git clone https://github.com/petermr/ami3.git`
    `cd ami 3 `
    `mvn install -Dmaven.test.skip=true`

After these commands, had to wait for long while ami gets installed. Created Path Variable as : C:\Users\mycomputer\ami3\target\appassembler\bin_


in my system. Reference: https://github.com/petermr/tigr2ess/blob/master/installation/windows/set_path/set_path.md

Results: Installation successful Check in Command Prompt: ami --help

Usage:

  1. Used getpapersto download the papers and ami to search them.

    A directory created when running getpapers output to run ami searches. eg. getpapers -q "COVID deaths" -o ami_test_3 -f cdeaths/log.txt -k 100 -x -p

Here, the CProject directory is named as "ami_test_3" and will be used for ami search.

RESULT:https://drive.google.com/file/d/1HRxlVilMS1LMyNTAmXX_6F1D-O-5fmjr/view?usp=sharing

  1. Ami searches the documents using bulletin dictionaries.

    Open command prompt, write ami-pdf -p ami_test_3 search --dictionary COVID hospitals

    OUTPUT: A folder with 8 items.

    RESULT: https://drive.google.com/file/d/1tm5QVpNhUEXVJh3CWHLr9XZ1sYwgHIL0/view?usp=sharing

Reference: https://github.com/petermr/openVirus/blob/master/examples/n95/OVERVIEW.md

Tester 5: Pruthiv Rajan

Operating System: Windows 10

Create a new folder in programming files and add the downloads

1. Installation of java:

Reference: https://www.java.com/en/download/win10.jsp Check for installation in Command Prompt: java -version

2. Installation of jdk 14.0.1:

Reference: https://www.oracle.com/in/java/technologies/javase-downloads.html

3. Installation of Maven:

Reference: https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip Launch GitBash

4. Installation of Git:

         Reference: https://git-scm.com/download/win
         Check in Command Prompt: `git -version`

5. Open your Command Prompt and type:

    `gitclone https://github.com/petermr/ami3.git`
    `cd ami 3 `
    `mvn install -Dmaven.test.skip=true`

After these commands, had to wait for long while ami gets installed. Created Path Variable as : C:\Users\mycomputer\ami3\target\appassembler\bin_


in my system. Reference: https://github.com/petermr/tigr2ess/blob/master/installation/windows/set_path/set_path.md

Results: Installation successful Check in Command Prompt: ami --help

Usage:

  1. Used getpapersto download the papers and ami to search them.

    A directory created when running getpapers output to run ami searches. eg. getpapers -q "COVID deaths" -o ami_test_3 -f cdeaths/log.txt -k 100 -x -p

Here, the CProject directory is named as "ami_test_3" and will be used for ami search.

RESULT:https://drive.google.com/file/d/1HRxlVilMS1LMyNTAmXX_6F1D-O-5fmjr/view?usp=sharing

  1. Ami searches the documents using bulletin dictionaries.

    Open command prompt, write ami-pdf -p ami_test_3 search --dictionary COVID hospitals

    OUTPUT: A folder with 8 items.

Clone this wiki locally