Git Product home page Git Product logo

nomenmatch's Introduction

NomenMatch

This branch is developed based on original version of NomenMatch. The following steps will run both original version (v1) and new version (v2) at the same time, if you only need particular version, please refer to respective branch.

Main changes compared to original version (v1)

  1. matching name of higher ranks such as order, family, genus
  2. matching common names (in traditional chinese)

Installing

  1. build image
 $ docker-compose build
  1. run devel
 $ docker-compose up -d
  1. create solr core & set custom config (only first time)
  $ docker-compose exec solr bash
  $ ./bin/solr create_core -c taxa
  $ cp solrconfig.xml /var/solr/data/taxa/conf
  $ cp managed-schema /var/solr/data/taxa/conf
  $ exit
  $ docker-compose restart solr
  1. prepare data for v1
  • prepare source data csv and put it in source-data folder
  • copy conf/sources.csv to source-data folder if source-data don't have sources.csv
  • modified souces.csv to map source id and source info
  $ cp conf/sources.csv source-data 
  1. import data (example: TaiCOL) for v1
  $ docker-compose exec php bash
  $ cd /code/workspace
  $ php ./importChecklistToSolr.php ../source-data/<taicol-checklist.csv> taicol
  1. prepare data for v2
  • prepare source data csv and put it in source-data folder
  • copy conf/sources.csv to source-data folder if source-data don't have sources.csv
  • modified souces.csv to map source id and source info
  $ cp v2/conf/sources.csv source-data 
  1. import data (example: TaiCOL) for v2
  $ docker-compose exec php bash
  $ cd /code/v2/workspace
  $ php ./importChecklistToSolr.php ../source-data/<taicol-checklist.csv> taicol_2

Note in order to distinguish between original TaiCOL and new TaiCOL, we use different source_id. (taicol for original TaiCOL and taicol_2 for new TaiCOL)

Source data format

Tab seperated, see v2/workspace/data/example.csv
Column definition:

  • namecode
  • accepted_namecode
  • scientific_name (full name or canonical form is ok)
  • name_url_id (the id which can be used to create a valid url to a taxon name page)
  • accepted_name_url_id (the id which can be used to create a valid url to an accepted taxon name page, if the name is a synonym)
  • family
  • order
  • class
  • phylum
  • kingdom
  • simple_name
  • name_status

Note example code for generating source data could be found in ./scripts folder.

Describe source data

Edit conf/sources.example.csv and rename to sources.csv
Column definition:

  • source_id
  • source_name
  • url_base (when combined with [accepted] name_url_id, it becomes valid url for the taxon, blah blah)
    for example,
  • citation format
  • source data page
  • date (of source data fetched, downloaded, or created)

Delete source data in solr

Under v2/workspace dir, run

php clean_source.php {source_id}

to remove a specific source from solr, or run

php clean_source.php all

to remove all sources at once.
If this script doesn't work, usually it means java heap space out of memory. Try to restart solr and then run again.

Demo

nomenmatch's People

Contributors

trashmai avatar jinyinglee avatar moogoo78 avatar mutolisp avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar Kyle Copas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.