Code Monkey home page Code Monkey logo

naruhodo-viewer's Introduction

naruhodo-viewer

License: MIT

日本語はこちら

A web application for interactive visualization of semantic graphs generated from naruhodo.

A snapshot of naruhodo-viewer webapp

Installation

First you need to install the latest version PyPI version of naruhodo and make sure it is working properly. For installation and setup of naruhodo, refer to this link.

Then you need to clone this repository to your local disk:

git clone https://github.com/superkerokero/naruhodo-viewer.git

Go to the directory of the app you have cloned, and edit config.json file in the root folder:

{
    "mp": false,
    "wv": ""
}

If mp is set to true, naruhodo will be run in multiprocessing mode(may provide speedup for multi-processor cpus), the default value is false.

If you want to use experimental coreference resolution function in naruhodo based on word embeddings, you need to change wv to the string of your word2vec model path. Otherwise leave it as an empty string.

A complete list of available config parameters and corresponding default values can be found in config-parameters section.

Next, open a terminal from the root folder of the repository, and use the following command to start the web server:

python viewer.py config.json

Now you can open your browser and go to the following address to use the app.

http://localhost:8000

Basic-Usage

  • You can use the input bar to add contents to the graph.

Input bar

  • Use Setting button to toggle setting menu.

Setting button

  • When you move your cursor over a node in the graph(or touch a node on mobile devices), a popup window will show you the original text that contains this node and its relative position in the input context.

Node popup

  • You can also add contents of webpages into graph directly using naruhodo's built-in scraper. But please be careful with large amount of texts, since too many nodes and edges in the graph will degrade the webapp's performance significantly.

Webpage added to graph

  • You can use clustering functions in the setting menu to cluster certain nodes together. A cluster node is repsented in a database shape like in the following snapshot. You can open a cluster by clicking the cluster node. Currently 3 types of clustering are supported:
    • Cluster by synonyms
    • Cluster by coreferences
    • Cluster by meaning(for meaningless stop words)
  • You can also use ClusterAll and OpenAll buttons to cluster or open all available clustering types at once.

Clustering

Config-parameters

name default description
mp false Use multiprocessing in naruhodo or not.
wv "" Path to your word2vec model.
debug false Debug mode
coref true Show coreferences
synonym true Show synonyms
server_ip "http://localhost" IP address of your naruhodo-viewer server.
server_port 8000 Port number of your naruhodo-viewer server.

naruhodo-viewer's People

Contributors

superkerokero avatar

Stargazers

Takao Mizuno avatar  avatar

Watchers

 avatar

Forkers

embeddedsamurai

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.