Package: showcase-parser
Copyright (c) 2018 Inui-Suzuki LaboratoryPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: # Showcase: Japanese Predicate-Argument Structure (PAS) analyzerShowcase is a Pytorch implementation of the Japanese Predicate-Argument Structure (PAS) analyser presented in the paper of Matsubayashi & Inui (2018) with some improvements.Given a input sentence, Showcase identifies verbal and nominal predicates in the sentence and detects their nominative (が), accusative (を), and dative (に) case arguments.The output case labels are based on the label definition of the NAIST Text Corpus where case markers in different voices are generalized into the case markers of an active voice.[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)## Usage### Pass input as an argument-`echo '今日は雨が降る' | showcase`### Pass input from STDIN`cat example.txt | showcase`### Input file format- One raw sentence per line.- A blank line can be used to segment a document. (Showcase just resets an argument index to zero.)## Requirements- Python 3.5 (or higher)- We do not support Python 2- [CaboCha](https://taku910.github.io/cabocha/) with JUMAN dict- PyTorch 0.4.0## Instllation### Step 1. Install Showcase`pip install showcase-parser`### Step 2: Download ResourcesResources include following files:- 10 Model files for predicate detector (`pred_model_0{0..9}.h5`)- 10 Model files for argument detector (`arg_model_0{0..9}.h5`)- Word embedding Matrix (`word_embedding.npz`)- POS embedding Matrix (`pos_embedding.npz`)- Word index file (`word.index`)- Part-of-Speech tag index file (`pos.index`)Resources are all available at [Google Drive](https://drive.google.com/drive/folders/1AK_oWgx1jd5cF2QAGv--r63ky0dgd52C?usp=sharing).- train/*.h5: models trained with the training set described in the paper.- train-test/*.h5:  models trained with the training and test sets.### Step 3: Create and edit config.jsonRun `showcase setup` to create `config.json` file in `$HOME/.config/showcase`.Then edit `config.json` and specify valid paths for:- Resources downloaded in Step 2- CaboCha and its JUMAN dictionaryOriginal `config.json` can be found at `showcase/data/config.json` of this repo.You may specify path to `config.json` as follows:`showcase -c /path/to/config/config.json`Note that the apporopriate thresholds (hyperparameters) for arguments differ for each model.The thresholds for the provided models are described in the sample config file in each Google Drive directory.## (Re-)trainingTBA### Step1: Train word2vecTBA### Step2: Train modelTBA### Step3: Convert word2vec- run `get_vocab_from_word2vec.py` and `convert_word2vec_to_npy.py`## Citation```@InProceedings{matsubayashi:2018:coling,author    = {Matsubayashi, Yuichiroh and Inui, Kentaro},title     = {Distance-Free Modeling of Multi-Predicate Interactions in End-to-End Japanese Predicate Argument Structure Analysis},booktitle = {Proceedings of the 27th International Conference on Computational Linguistics (COLING)},year      = {2018},}```Platform: UNKNOWNClassifier: Programming Language :: Python :: 3.5Provides-Extra: testProvides-Extra: docs