필터 지우기
필터 지우기

Predicting text with neural networks

조회 수: 1 (최근 30일)
Philip G
Philip G 2017년 4월 13일
댓글: Philip G 2017년 4월 20일
Hi, I have worked with standard fitting and classification networks as well as convolutional networks so far. But now I am stuck with a problem and maybe you can steer me towards the right direction.
In general I want to predict text. As input I have a very long text available. So 26 letters + spaces + some symbols. Lets say 30 parameters. My idea was the following, using standard feed forward networks:
  • Hot-One-Encode the letters to create 30 classes (lets call them C)
  • Cut the text into N pieces of length L (5 for example) with a sliding window
  • use each piece as one sample (of size L x C)
  • and then use the following letter as an output (of size 1 x C)
  • for example: The text says "alphabet" - this gives input "alpha" + output "b", input "lphab" + output "e", and so on
  • finally the network could be used step by step to predict letters
For this strategy one problem I encountered was, that the size of the input is L x C. And squeezing it into an array did not yield proper results.
I assume for this task, a RNN ( layrecnet ) or Nonlinear autoregressive neural network ( narnet ) might be a lot easier to use, as for the latter one - the whole text would be the input vector and no output vector is needed. As I am not very experienced with time-series networks ... maybe some of you can give me a hint what architecture to use - or how I could modify the decribed network to perform this task. Thanks.
  댓글 수: 1
Philip G
Philip G 2017년 4월 20일
Is anything unclear? Also my last questions here did not get any answers ... and if even questions like "i have 2 cell - how can i combine them?!" get answers ... I think I am doing something wrong ;)
Just links to the topic would also help me. Thanks in advance.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by