All Projects → debjitpaul → Multi-Hop-Knowledge-Paths-Human-Needs

debjitpaul / Multi-Hop-Knowledge-Paths-Human-Needs

Licence: other
Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Multi-Hop-Knowledge-Paths-Human-Needs

chronist
Long-term analysis of emotion, age, and sentiment using Lifeslice and text records.
Stars: ✭ 23 (+35.29%)
Mutual labels:  sentiment-analysis
sentibol
⚽ Notebook feito para analisar o case do Sentibol
Stars: ✭ 18 (+5.88%)
Mutual labels:  sentiment-analysis
AI-Sentiment-Analysis-on-IMDB-Dataset
Sentiment Analysis using Stochastic Gradient Descent on 50,000 Movie Reviews Compiled from the IMDB Dataset
Stars: ✭ 55 (+223.53%)
Mutual labels:  sentiment-analysis
Senti4SD
An emotion-polarity classifier specifically trained on developers' communication channels
Stars: ✭ 41 (+141.18%)
Mutual labels:  sentiment-analysis
FUSION
PyTorch code for NeurIPSW 2020 paper (4th Workshop on Meta-Learning) "Few-Shot Unsupervised Continual Learning through Meta-Examples"
Stars: ✭ 18 (+5.88%)
Mutual labels:  self-attention
applytics
Perform Sentiment Analysis on reviews of your apps
Stars: ✭ 21 (+23.53%)
Mutual labels:  sentiment-analysis
sentiment-analysis-torchtext
Seniment Analysis in Torchtext
Stars: ✭ 19 (+11.76%)
Mutual labels:  sentiment-analysis
opinionMining
Opinion Mining/Sentiment Analysis Classifier using Genetic Programming
Stars: ✭ 13 (-23.53%)
Mutual labels:  sentiment-analysis
sentometrics
An integrated framework in R for textual sentiment time series aggregation and prediction
Stars: ✭ 77 (+352.94%)
Mutual labels:  sentiment-analysis
analyzing-reddit-sentiment-with-aws
Learn how to use Kinesis Firehose, AWS Glue, S3, and Amazon Athena by streaming and analyzing reddit comments in realtime. 100-200 level tutorial.
Stars: ✭ 40 (+135.29%)
Mutual labels:  sentiment-analysis
Transformer-in-PyTorch
Transformer/Transformer-XL/R-Transformer examples and explanations
Stars: ✭ 21 (+23.53%)
Mutual labels:  self-attention
ml flood
Machine learning to predict floods
Stars: ✭ 50 (+194.12%)
Mutual labels:  2019
github-analysis-2019
An analysis of GitHub 2019, for study purpose
Stars: ✭ 22 (+29.41%)
Mutual labels:  2019
spark-twitter-sentiment-analysis
Sentiment Analysis of a Twitter Topic with Spark Structured Streaming
Stars: ✭ 55 (+223.53%)
Mutual labels:  sentiment-analysis
2019
National Novel Generation Month, 2019 edition.
Stars: ✭ 96 (+464.71%)
Mutual labels:  2019
text analysis tools
中文文本分析工具包(包括- 文本分类 - 文本聚类 - 文本相似性 - 关键词抽取 - 关键短语抽取 - 情感分析 - 文本纠错 - 文本摘要 - 主题关键词-同义词、近义词-事件三元组抽取)
Stars: ✭ 410 (+2311.76%)
Mutual labels:  sentiment-analysis
CS231n
Solutions to Assignments of CS231n: Convolutional Neural Networks for Visual Recognition(http://cs231n.github.io/)
Stars: ✭ 13 (-23.53%)
Mutual labels:  2019
brand-sentiment-analysis
Scripts utilizing Heartex platform to build brand sentiment analysis from the news
Stars: ✭ 21 (+23.53%)
Mutual labels:  sentiment-analysis
Movie-Recommendation-System-with-Sentiment-Analysis
This is a Machine Learning project to create a "Movie Recommender System" and predict user ratings for movies using cosine similarity.
Stars: ✭ 21 (+23.53%)
Mutual labels:  sentiment-analysis
sentiment analysis dict
sentiment analysis、情感分析、文本分类、基于字典、python、classification
Stars: ✭ 111 (+552.94%)
Mutual labels:  sentiment-analysis

Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs (NAACL 2019)

This directory contains the following parts of the 'Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs' experiment. We present a novel method to extract, rank, filter and select multi-hop relation paths from a commonsense knowledge resource to interpret the expression of sentiment in terms of their underlying human needs. Multi-Hop Knowledge Model

Requirements

- python3+
- nltk
- igraph
- Tensorflow 1.12.0
- Tensorflow-hub

Install

- pip install tensorflow
- pip install tensorflow-hub
- pip install nltk
- pip install python-igraph
- pip install spacy 
- pip install sklearn

About Data

Modeling Naive Psychology of Characters in Simple Commonsense Stories

ConceptNet:

ConceptNet 5.6.0 

Data prep :

Please find more details in this folder

Run

Steps:

Download the csv file from ConceptNet webpage

File Link: path_to_ConceptNet_csv_file

Construct ConceptNet into a graph:

python src/graph_model/conceptnet2graph.py path_to_ConceptNet_csv_file 

In this step we make the conceptnet.csv into a graph representation as conceptnet .

To construct subgraph per sentence:

python src/graph_model/make_sub_graph_server.py "inputfile" "graphpath" "outputpath" "--purpose" purpose

Here, the graphpath is the above constructed graph which is 'concept_graph_full'

Requirements:

Input Sample

Inputfile: Path to the input file as mentioned in this Input Sample 
Graphpath: Path of the conceptnet as graph. 
Output path: Path to store the subgraph
Purpose: dev or train or test

Please note: You need to extract the concepts for each sentence using n-gram matching.

To extract relevant knowledge paths:

python src/graph_model/extract_path.py --graph_path --input_path --output_path --input_path
               or 
./src/graph_model/run_extraction.sh

Requirements:

Graphpath: Path of the subgraph. 
Inputfile: Path to the input file as mentioned in this Input sample
Output path: Path to store knowledge paths per context_sentence_ids. 
Purpose: dev or train or test

Data Format and Requirements:

Please find the data format in data_prep

Finally, to run the neural model:

./src/neural_model/run_experiment.sh

Reference

If you make use of the contents of this repository, please cite the following paper:

@inproceedings{paul-frank-2019-ranking,
    title = "Ranking and Selecting Multi-Hop Knowledge Paths to Better Predict Human Needs",
    author = "Paul, Debjit  and
      Frank, Anette",
    booktitle = "Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)",
    month = jun,
    year = "2019",
    address = "Minneapolis, Minnesota",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/N19-1368",
    pages = "3671--3681",
    abstract = "To make machines better understand sentiments, research needs to move from polarity identification to understanding the reasons that underlie the expression of sentiment. Categorizing the goals or needs of humans is one way to explain the expression of sentiment in text. Humans are good at understanding situations described in natural language and can easily connect them to the character{'}s psychological needs using commonsense knowledge. We present a novel method to extract, rank, filter and select multi-hop relation paths from a commonsense knowledge resource to interpret the expression of sentiment in terms of their underlying human needs. We efficiently integrate the acquired knowledge paths in a neural model that interfaces context representations with knowledge using a gated attention mechanism. We assess the model{'}s performance on a recently published dataset for categorizing human needs. Selectively integrating knowledge paths boosts performance and establishes a new state-of-the-art. Our model offers interpretability through the learned attention map over commonsense knowledge paths. Human evaluation highlights the relevance of the encoded knowledge.",
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].