[JAVA]清洗latex数据

首先,找出符合条件的文章。

 

一.清洗公式 

格式为

\\begin{equation}...\\end{equation}

\\begin{eqnarray}...\\end{eqnarray}

二.以每段为准,将句子连接,接着进行分句(每行为一个句子)。(暂时不分句)

三.清洗标签

1.清洗公式标签,格式为

(\\$$.*?\\$$)?

(\\$.*?\\$)?

2.清洗文献引用,斜体

\cite{...} 

\footnote{...}

{\em ...}

\item

\begin{enumerate} \end{enumerate}

四、词根化

Porterstemmer

五、去停用词

FileExcludeStopWord

 

另附获取web的文章id与subjects对应信息

保存网页

一.Test

从网页解析数据,通过匹配字符信息来获取文章id、Title、subjects。

二.subjectindex

document-subjects数字化,将subject标注,doc转化。

三、countsort

统计每个subjects包含几个文件,并排序。

四、chooseK

选择符合条件的数据集,选择与K线性增大的数据集。

 

posted on 2015-07-04 11:02  yyyyyi  阅读(705)  评论(0编辑  收藏  举报

导航