7
$\begingroup$

I am building a entity detection and relation classification method using deep learning approach which requires vector representation of POS tags and entity label. I am familiar with word-embedding method but I don't know the answer of following questions:

  • How to convert pos tags into vector representation(say 20 dim)
  • How to combine both word embeddings and pos embedding together to build the classifier.

Similar question was asked in Cross validate community but I couldn't find the answer. Here is the link to question: https://stats.stackexchange.com/questions/238016/deep-learning-word-embedding-with-parts-of-speech

Research paper link: https://arxiv.org/abs/1601.00770

$\endgroup$
2
  • $\begingroup$ I think you can just use one-hot vector for POS tag. As for now combining, you can try multiple things like giving them as independent features or concatenating them. $\endgroup$ Jan 18, 2017 at 6:07
  • $\begingroup$ There are two ways I could find for embedding POS tags: first is One-hot encoding for POS tags.. Other one is learn embedding from training data with word corresponding tag as input.. Later one I think is better as it learn context of words for the relevant tag.. Currently I am implementing the second one.. if it works I will post it.. Let me know your thoughts about it.. $\endgroup$
    – Neel
    Jan 19, 2017 at 1:14

1 Answer 1

0
$\begingroup$

Word Embedding for Pos tags can easily be trained using pos tags sequence. There are lot of ways that you can get the trained model. I did it by gensim's word2vec api. Here is the link to it: https://radimrehurek.com/gensim/models/word2vec.html

Also if you want memory efficient solution, radim(creater of gensim) provides a great tutorial: https://rare-technologies.com/word2vec-tutorial/

You just need to pass pos sequence of your training data, resulting vector size, min frequency count etc. You can view api's documentation for more detail.

$\endgroup$
1
  • $\begingroup$ Hey buddy, I know it's been 2 years but can you tell me what you mean by "pass pos sequence"? If my sentence is: "w1/t1 w2/t2 w3/t3", should I send "t1 t2 t3" as input sequence to word2vec or Glove? Or is there an easy way to do that? $\endgroup$
    – stuck
    Jan 19, 2020 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.