Code Monkey home page Code Monkey logo

ami-summarise's Introduction

ami-summarise

Summarise output from The Content Mine's AMI plug-in into a format that can be displayed in ami-viz.

Before running this code, run the following Content Mine pipeline (see mine.sh for example commands):

  1. getpapers to download articles
  2. norma to create scholarly.html for all articles
  3. ami2-species or ami2-word to generate the results.xml files

Input directory/files

The data directory (stored in the data.dir variable in main.r) should contain one subfolder for each article, named after the article's ID (done automatically by getpapers). After processing with AMI, these subfolders should contain a 'results' folder, which will in turn contain:

  • species/binomial/results.xml
  • word/frequencies/results.xml

This program will take these files, summarise them across all articles and output JSON files ready to be visualised in an interactive network graph (for example: https://github.com/matthewgthomas/ami-viz).

To use, run the code in main.r.

Output files

The program will write three JSON files containing nodes and edge lists:

  • words.json -- the top X most frequent words and the articles in which they appear
  • words_tdidf.json -- same as above but calculated using term frequency-inverse document frequency (TF-IDF)
  • species.json -- occurrences of binomial species names and the articles in which they appear

To do

  • Add support for more AMI plugins
  • Make faster -- code is slow when running over 100s of articles

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.