我正在尝试构建文本分类器。通常,我们只有一个包含地面真相(ground truth)的文本列。但我现在遇到一个数据集,其中包含许多文本特征。我正在探索如何利用不同的文本特征的不同方法。
例如,我的数据集长这样
Index_no domain comment_by comment research_paper books_name
01 Science Professor Thesis needs Evolution of MOIRCS
more work Quiescent Deep
Galaxies as a Survey
Function of
Stellar Mass
02 Math Professor Doesn't follow Evolution of
Latex format Quiescent nonlinear
Galaxies as a dispersive
Function of equations
Stellar Mass
这只是一份虚拟数据集, 我的目标值(Y)是领域(domain),特征包括comment_by
, comment
, research_paper
, books_name
如果我要使用任何NLP模型(RNN-LSTM, Transformers等), 这些模型通常需要一个三维向量,如果我使用一个文本列,那么这个方法可以适用,但是对于文本分类器来说,如何处理多个文本特征?
我试过的方法有:
1) 将所有列连接起来并形成长字符串
教授论文需要更多的工作,作为星际质量的函数静止星系的演化,MOIRCS深度调查
2) 在列之间使用令牌
<CB> Professor <C> Thesis needs more work <R> Evolution of Quiescent Galaxies as a Function of Stellar Mass <B> MOIRCS Deep Survey
在哪里使用<CB>
comment_by,<C>
comment,<R>
research_paper,<B>
books_name?
我应该在开头使用<CB>
还是像这样使用?
Professor <1> Thesis needs more work <2> Evolution of Quiescent Galaxies as a Function of Stellar Mass <3> MOIRCS Deep Survey
3) 使用不同的密集层(或嵌入)为每列,并将它们连接在一起。
我已经尝试了这三种方法,还有其他方法可以尝试以提高模型准确性吗?或者提取、组合、联接更好的特征?
先谢谢您!