All Projects → malllabiisc → CaRE

malllabiisc / CaRE

Licence: Apache-2.0 license
EMNLP 2019: CaRe: Open Knowledge Graph Embeddings

Programming Languages

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

Projects that are alternatives of or similar to CaRE

Kprn
Reasoning Over Knowledge Graph Paths for Recommendation
Stars: ✭ 220 (+547.06%)
Mutual labels:  embeddings, knowledge-graph
Entity2rec
entity2rec generates item recommendation using property-specific knowledge graph embeddings
Stars: ✭ 159 (+367.65%)
Mutual labels:  embeddings, knowledge-graph
Cesi
WWW 2018: CESI: Canonicalizing Open Knowledge Bases using Embeddings and Side Information
Stars: ✭ 85 (+150%)
Mutual labels:  embeddings, knowledge-graph
cskg
CSKG: The CommonSense Knowledge Graph
Stars: ✭ 86 (+152.94%)
Mutual labels:  embeddings, knowledge-graph
Mapeathor
Translator of spreadsheet mappings into R2RML, RML or YARRRML
Stars: ✭ 27 (-20.59%)
Mutual labels:  knowledge-graph
nlm
Memory for Knowledge Graph, using Neo4j. 知识图谱存储与查询。
Stars: ✭ 43 (+26.47%)
Mutual labels:  knowledge-graph
embedding evaluation
Evaluate your word embeddings
Stars: ✭ 32 (-5.88%)
Mutual labels:  embeddings
DeepLearningReading
Deep Learning and Machine Learning mini-projects. Current Project: Deepmind Attentive Reader (rc-data)
Stars: ✭ 78 (+129.41%)
Mutual labels:  embeddings
KGReasoning
Multi-Hop Logical Reasoning in Knowledge Graphs
Stars: ✭ 197 (+479.41%)
Mutual labels:  knowledge-graph
teaching
Teaching material relevant to KGs
Stars: ✭ 61 (+79.41%)
Mutual labels:  knowledge-graph
KBRD
Towards Knowledge-Based Recommender Dialog System @ EMNLP 2019
Stars: ✭ 123 (+261.76%)
Mutual labels:  knowledge-graph
PersianNER
Named-Entity Recognition in Persian Language
Stars: ✭ 48 (+41.18%)
Mutual labels:  embeddings
morph-kgc
Powerful RDF Knowledge Graph Generation with [R2]RML Mappings
Stars: ✭ 77 (+126.47%)
Mutual labels:  knowledge-graph
vsm-box
Web-component for creating & showing VSM-sentences — Visual Syntax Method
Stars: ✭ 25 (-26.47%)
Mutual labels:  knowledge-graph
harika
Offline-, mobile-first graph note-taking app focused on performance with the knowledgebase of any scale
Stars: ✭ 111 (+226.47%)
Mutual labels:  knowledge-graph
KBE
Node.js application to extract the knowledge represented in Google infoboxes (aka Google Knowlege Graph Panel)
Stars: ✭ 27 (-20.59%)
Mutual labels:  knowledge-graph
codelani
PLDB: a Programming Language Database. A public domain knowledge graph focused on programming languages distributed as a CSV file.
Stars: ✭ 610 (+1694.12%)
Mutual labels:  knowledge-graph
calamus
A JSON-LD Serialization Libary for Python
Stars: ✭ 21 (-38.24%)
Mutual labels:  knowledge-graph
meemi
Improving cross-lingual word embeddings by meeting in the middle
Stars: ✭ 20 (-41.18%)
Mutual labels:  embeddings
ClusterTransformer
Topic clustering library built on Transformer embeddings and cosine similarity metrics.Compatible with all BERT base transformers from huggingface.
Stars: ✭ 36 (+5.88%)
Mutual labels:  embeddings

CaRe

CaRe: Open Knowledge Graph Embeddings

Source code and dataset for EMNLP 2019 paper: CaRe: Open Knowledge Graph Embeddings.

Overview of CaRe. CaRe learns KG embeddings from the augmented OpenKG. Base model can be any existing KG embedding model (e.g., TransE, ConvE). RP embeddings are parameterized by encoding vector representations of the word sequence composing them. This enables CaRe to capture semantic similarity of RPs. Embeddings of NPs are made more context rich by updating them with the represenations of canonical NPs (connected with dotted lines). A generic nomenclature for CaRe framework is defined as CaRe(B,PN,CN). We define Bi-GRU and LAN as default val- ues for the PN and CN arguments respectively. Please refer to the paper for more details.

Dependencies:

  • Compatible with Pytorch 1.1 and Python 3.x.
  • Dependencies can be installed using requirements.txt.

Dataset:

  • Pre-processed datasets ReVerb45k, ReVerb20K are included with the repository present in the Data directory.

  • The datasets are originally taken from CESI.

  • Both the datasets contain the following files:

    ent2id.txt: all noun phrases and corresponding ids, one per line. The first line is the number of noun phrases.

    rel2id.txt: all relation phrases and corresponding ids, one per line. The first line is the number of relations.

    train_trip.txt: training file, the first line is the number of triples for training. Then the following lines are all in the format (s,r,o) which indicates there is a relation rel between s and o . Note that train_trip.txt contains ids from ent2id.txt and rel2id.txt instead of the actual noun and relation phrases.

    test_trip.txt: testing file, the first line is the number of triples for testing. Then the following lines are all in the format (s,r,o) .

    valid_trip.txt: validating file, the first line is the number of triples for validating. Then the following lines are all in the format (s,r,o) .

    cesi_npclust.txt: The noun phrase canonicalization output of CESI. Each line corresponds to the canonicalization information of a noun phrase in the following format (NP_id, no. of canonical NPs, list ids of canonical NPs) .

    gold_npclust.txt: The ground truth noun phrase canonicalization information. This information is used during evaluations. Each line corresponds to the canonicalization information of a noun phrase in the following format (NP_id, no. of canonical NPs, list ids of canonical NPs) .

Usage:

Any existing KG embedding model can used in the CaRe framework. Codes for the following Base Models (B) is provided:

  • ConvE in the directory CaRe(B=ConvE).
  • TransE in the directory CaRe(B=TransE).
  • Some of the important available options include:
    '-CN',   dest='CN', default='LAN', choices=['LAN','GCN','GAT','Phi'], help='Choice of Canonical Cluster Encoder Network'
    '-dataset', dest='dataset', default='ReVerb45K',choices=['ReVerb45K','ReVerb20K'], help='Dataset Choice'
    '-nfeats', dest='nfeats', default=300, type=int, help='Embedding Dimensions'
    '-bidirectional',  dest='bidirectional', default=True, type=bool, help='type of encoder network'
    '-poolType', dest='poolType', default='last', choices=['last','max','mean'], help='pooling operation for encoder network'
Run the main code:
  • After installing python dependencies, execute sh setup.sh to download pre-trained glove embeddings. (Experiments can be run without this step as well. In that case word vectors would get randomly initialized.)
  • Move to the directory of corresponding to the choice of Base model and execute: python CaRe_main.py -CN LAN -dataset ReVerb45K.
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].