找回密码
 立即注册
libSVM分类文本程序 | Python编程 2022-09-24 128 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
近来一段时间在写用于感爱分析方面的论文,用到了SVM作为分类算法进行感爱分类。我选用了著名的SVM开源工具包libSVM,公然作用不错。因为LibSVM的输入语料格式有必定的请求。故有时候怎样把大家的练习语料转换成LibSVM的输入语料格式,是一个比较费事的办公。在做这个的过程中我也遇到了挺多费事的办公的,比方刚开始的时候,我把同一类的样例放在了一个,呈现的结果是libSVM无法进行准确分类。。。搞了良久都不认识是什么因素,后来总算清理了。后边我将写写是用libSVM的一些心得。我把基于SVM进行文本分类的程序整理了一下,现在跟大家分享下,因为该程序用到了中科院的分词工具ICTCLAS,及LibSVM,请大家自行到他们的官网下载。只需您依照我文本分类程序中readme文本分类的首要过程.txt的说明一步一步终结的话,就可以进行文本分类。因为急着写论文,下一阶段我将写个批管理文件,让是用跟容易。本资料共包括以下附件:
文本分类程序(使用libSVM)\dict.txt
文本分类程序(使用libSVM)\featureselection.exe
文本分类程序(使用libSVM)\getFeature.exe
文本分类程序(使用libSVM)\getRandFile.exe
文本分类程序(使用libSVM)\getSVMTtrain.exe
文本分类程序(使用libSVM)\mergeFile.bat
文本分类程序(使用libSVM)\readme文本分类的首要过程.txt
文本分类程序(使用libSVM)\seg.exe
.....

(Recently, I was writing a paper for sentiment analysis, and used SVM as a classification algorithm for sentiment classification. I chose the famous SVM open source toolkit libSVM, which works well. Because the input corpus format of LibSVM has certain requirements. Therefore, sometimes how to convert everyone's practice corpus into the input corpus format of LibSVM is a laborious work. In the process of doing this, I also encountered a lot of troublesome office work. For example, at the beginning, I put samples of the same type in one, and the result was that libSVM could not be accurately classified. . . It took me a long time to figure out what the cause was, but it was finally cleared up. Later I will write about some experiences of using libSVM. I have sorted out the program for text classification based on SVM, and now I will share it with you, because the program uses ICTCLAS, a word segmentation tool of the Chinese Academy of Sciences, and LibSVM, please download it from their official website. As long as you follow the instructions of the first step of the readme text classification in my text classification program.txt, you can complete the text classification step by step. Because I am in a hurry to write the thesis, I will write a batch management file in the next stage to make it easy to use. This document includes the following attachments:
Text Classifier (using libSVM)\dict.txt
Text classifier (using libSVM)\featureselection.exe
Text Classifier (using libSVM)\getFeature.exe
Text Classifier (using libSVM)\getRandFile.exe
Text classifier (using libSVM)\getSVMTtrain.exe
Text Classifier (using libSVM)\mergeFile.bat
Text classification program (using libSVM)\readmeThe first process of text classification.txt
Text Classifier (using libSVM)\seg.exe
.....)

[下载]16270229552.rar




上一篇:CRC校验源码分析
下一篇:C语言经典算法100例