METHOD AND APPARATUS FOR BUILDING TEXT CLASSIFICATION MODEL, AND TEXT CLASSIFICATION METHOD AND APPARATUS
The present disclosure provides a method and apparatus for building a text classification model, and a text classification method and apparatus. The method of building a text classification model comprises: obtaining a training sample; obtaining a vector matrix corresponding to the text, after perfo...
Saved in:
Main Authors | , , , |
---|---|
Format | Patent |
Language | English |
Published |
28.03.2019
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The present disclosure provides a method and apparatus for building a text classification model, and a text classification method and apparatus. The method of building a text classification model comprises: obtaining a training sample; obtaining a vector matrix corresponding to the text, after performing word segmentation for the text based on an entity dictionary; using the vector matrix corresponding to the text and a class of the text to train a first classification model and a second classification model respectively; during the training process, using a loss function of the first classification model and a loss function of the second classification model to obtain a loss function of the text classification model, and using the loss function of the text classification model to adjust parameters for the first classification model and the second classification model, to obtain the text classification model formed by the first classification model and the second classification model. The text classification method comprises: obtaining a to-be-classified text; obtaining a vector matrix corresponding to the text, after performing word segmentation for the text based on an entity dictionary; inputting the vector matrix into a text classification model, and obtaining a classification result of the text according to output of the text classification model. The text classification effect can be improved through the technical solutions of the present disclosure. |
---|---|
Bibliography: | Application Number: US201816116710 |