프로젝트
GitHub에서 보기
TatsuyaShirakawa/poincare-embedding
소개
Poincaré Embedding (unofficial)
AI 및 머신러닝측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalpoincare-embedding
These codes implement Poincar'e Embedding introduced in the following paper:
Requirements
- C++ compiler that supports c++14 or later
- for Windows user, using cygwin is recommended (with CMAKE and gcc/g++ selection) (thanks @patrickgitacc)
Build
cd poincare-embedding
mkdir work & cd work
cmake ..
make
Setup python environment
From the poincare-embeddings directory...
python3 -m venv venv
source venv/bin/activate
if using windows:
python3 -m venv venv
venv\Scripts\activate
Then run the following:
python3 -m pip install -r requirements.txt
python3 -c "import nltk; nltk.download('wordnet')"
Tutorial
We assume that you are in work directory
cd poincare-embedding
mkdir work & cd work
Data Creation
You can create WordNet noun hypernym pairs as follows
python ../scripts/create_wordnet_noun_hierarchy.py ./wordnet_noun_hypernyms.tsv
and mammal subtree is created by
python ../scripts/create_mammal_subtree.py ./mammal_subtree.tsv
Run
./poincare_embedding ./mammal_subtree.tsv ./embeddings.tsv -d 2 -t 8 -e 1000 -l 0.1 -L 0.0001 -n 20 -s 0
Plot a Mammal Tree
python ../scripts/plot_mammal_subtree.py ./embeddings.tsv --center_mammal
Note: if that doesn't work, may need to run the following:
tr -d '\015' < embeddings.tsv > embeddings_clean.tsv
Double check that the file has removed the character in question, then run
mv embeddings_clean.tsv embeddings.tsv

관련 프로젝트 살펴보기
불러오는 중…