I am working on keyphrase extraction. Right now, I was able to create some features and run the candidate phrases along with the features for training a machine learning model for classification using random forest.

Now, out of curiosity, I would like to try out deep learning. I would like to remove the layer of feature extraction manually and then have it figure out the features by itself. Then generate a model by just passing some text documents and the relative key phrases (1/0 whether correct or incorrect) for each document. My question, does any training model accept plain text instead of floating point values? If not, how do I achieve the same thing by converting the sentences and keyphrases into floating point values and then pass through the trained model?

I tried creating a model using Keras Sequential model (sample given):

model = Sequential()
model.add(Dense(18, input_dim=14, init='uniform', activation='relu'))
model.add(Dense(14, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))

# Compile model
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Fit the model
model.fit(X, Y, epochs=300, batch_size=10)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.