Skip to content

Commit

Permalink
add description of code link
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed Dec 23, 2020
1 parent c1b0246 commit cba91cd
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion BERT.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/pdf/1810.04805.pdf)
import numpy as np
import tensorflow as tf
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import time
from GPT import GPT
import os
Expand Down
2 changes: 1 addition & 1 deletion BERT_window_mask.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tensorflow as tf
from GPT import GPT, train, export_attention
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)


class BERT(GPT):
Expand Down
4 changes: 2 additions & 2 deletions CBOW.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# [Efficient Estimation of Word Representations in Vector Space](https://arxiv.org/pdf/1301.3781.pdf)
from tensorflow import keras
import tensorflow as tf
from utils import process_w2v_data
from visual import show_w2v_word_embedding
from utils import process_w2v_data # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
from visual import show_w2v_word_embedding # this refers to visual.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)

corpus = [
# numbers
Expand Down
3 changes: 1 addition & 2 deletions ELMo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# [Deep contextualized word representations](https://arxiv.org/pdf/1802.05365.pdf)
from tensorflow import keras
import tensorflow as tf
import numpy as np
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import time
import os

Expand Down
2 changes: 1 addition & 1 deletion GPT.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [Improving Language Understanding by Generative Pre-Training](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf)
import tensorflow as tf
from tensorflow import keras
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import time
from transformer import Encoder
import pickle
Expand Down
2 changes: 1 addition & 1 deletion cnn-lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import tensorflow as tf
from tensorflow import keras
import numpy as np
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import tensorflow_addons as tfa


Expand Down
2 changes: 1 addition & 1 deletion seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import tensorflow as tf
from tensorflow import keras
import numpy as np
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import tensorflow_addons as tfa


Expand Down
2 changes: 1 addition & 1 deletion seq2seq_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import tensorflow as tf
from tensorflow import keras
import numpy as np
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import tensorflow_addons as tfa
import pickle

Expand Down
4 changes: 2 additions & 2 deletions skip-gram.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# [Efficient Estimation of Word Representations in Vector Space](https://arxiv.org/pdf/1301.3781.pdf)
import tensorflow as tf
from tensorflow import keras
from utils import process_w2v_data
from visual import show_w2v_word_embedding
from utils import process_w2v_data # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
from visual import show_w2v_word_embedding # this refers to visual.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)

corpus = [
# numbers
Expand Down
2 changes: 1 addition & 1 deletion tf_idf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
from collections import Counter
import itertools
from visual import show_tfidf
from visual import show_tfidf # this refers to visual.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)

docs = [
"it is a good day, I like to stay here",
Expand Down
2 changes: 1 addition & 1 deletion tf_idf_sklearn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from visual import show_tfidf
from visual import show_tfidf # this refers to visual.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)


docs = [
Expand Down
2 changes: 1 addition & 1 deletion transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import tensorflow as tf
from tensorflow import keras
import numpy as np
import utils
import utils # this refers to utils.py in my [repo](https://github.com/MorvanZhou/NLP-Tutorials/)
import time
import pickle
import os
Expand Down

0 comments on commit cba91cd

Please sign in to comment.