Skip to content
Lakshmi Devi Priya edited this page Sep 20, 2020 · 19 revisions

installing and running ami3

what is ami3 and why do we need it?

ami is a framework for gathering, searching, transforming scholarly publications, oriented towards STEMM (Science, technology, Engineering, Medicine, Maths).

where do I get ami

Pre-requisties

Ensure their installations and path. Then proceed with the following steps.

Download the latest pre-built package (recommended)

By Remko Popma: You can use this instead of building from source.

  • 📢 Announcement: ami is now available as a binary distribution.:tada:
  • 🛠️ No need to build ami from source with git pull & mvn clean package any more.
  • 🎁 Package contents are the same as target/appassembler/ when building from source.
  • 📩 Download the zip or bz2 archive with all jars and launcher scripts from https://github.com/petermr/ami3/packages/

Please take a look at the updated ami documentation:

Building Locally

See detailed instructions in https://github.com/petermr/ami3/blob/master/BUILDING.md. Some of these instructions are repeated below.

If building locally, follow all the below steps.

The repository is at: https://github.com/petermr/ami3

You will need git installed. Clone it using

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

For Windows: If you get the following error:

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

Use the following commands step-by-step:

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

See FAQ for reason.

How do I build / install ami?

You will need Maven installed. Assume ami3 has been cloned to home/my/software/ami3 (you don't have to use these names). Note that you should always clean install (some of the earlier documentation missed this)

Then

cd home/my/software/ami3
git pull 
mvn clean install -Dmaven.test.skip=true 

setting the path

Set the path for ami3/target/appassembler/bin and ami3/target/appassembler/repo in your system that are build in ami3 cloned repo folder.

My path includes home/my/software/ami3/target/appassembler/bin

(NOTE : The path varies according to the directory where you have cloned your ami3 repo)

Updating ami3

  1. In command prompt/terminal, navigate to your cloned repo ami3 using the command cd ami3 and give the command git pull.
  2. Then run the command mvn clean install -Dmaven.test.skip=true and it should show the following output :
[INFO] Installing C:\Users\admin\ami3\target\ami3-0.1-SNAPSHOT-jar-with-dependencies.jar to C:\Users\admin\repository\org\contentmine\ami3\0.1-SNAPSHOT\ami3-0.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] --------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 15:14 min
[INFO] Finished at: 2020-07-08T16:09:45+05:30
[INFO] --------------------------------------------------------------------------------------------------------------------

For Windows: If the command mvn clean install -Dmaven.test.skip=true, shows the following error :

[...]   BUILD FAILURE 
.
.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project ami3: Failed to clean project: Failed to delete C:\Users\admin\ami3\target\appassembler\repo\zt-process-killer-1.10.jar -> [Help 1]
[...]
  • Try closing the Command Prompt window, where you’re running the command and try again in a new window.

If it again ends with BUILD FAILURE error,

  • Is there another Command Prompt window still open? Try closing all windows and try again. If that doesn’t work, you may need to reboot your computer.

  • That other Command Prompt probably had a process running that was using that jar file, so it couldn’t be deleted and ends in BUILD FAILURE ( also see FAQ )

AMIDICT VALIDATION

(NEEDS TESTING)

  • Now, for dictionary validation give the command amidict --dictionary <dictionary> --directory C:\Users\openVirus\cambiohack2020\dictionaries display --validate.
  • <dictionary> is replaced by the dictionary title (such as country, disease) in accordance with the dictionary to be validated.
  • directory is the location of PARENT directory of your dictionary.
Clone this wiki locally