Chinese-Text-Classification-Pytorch-master。 数据齐全,说明文档详细。点击即用! # 训练并测试: # TextCNN python run.py --model TextCNN # TextRNN python run.py --model TextRNN # TextRNN_Att python run.py --model TextRNN_Att # TextRCNN python run.py --model TextRCNN # FastText, embedding层是随机初始化的 python run.py --model FastText --embedding random # DPCNN python run.py --model DPCNN # Transformer python run.py --model Transformer
2023-03-20 10:32:05 15.94MB Chinese-Text-Cla
1
车祸事故项目 道路交叉口经常发生交通事故。 一个能够在发生事故时发出警告的系统是对事故做出快速响应的必要条件。 我们的项目能够检测到尤其在道路交叉口发生的“ T”形事故。 在项目中,通过查看被检测对象的坐标相交来进行事故检测。 Darknet YOLO V3用于事故检测。 通过查看汽车,摩托车,自行车和公共汽车的坐标来进行事故检测。 该算法在白天碰撞视频期间在单车道道路上的“ T”形碰撞中正常工作。 该项目是在Ubuntu 18.04操作系统上开发的。 在您自己的计算机上运行项目 在计算机上安装 。 将将Darknet构建后创建的“ darknet.so”文件粘贴到项目目录中,并将文件名更改为“ libdarknet.so”。 创建虚拟环境(Python 3.6) 上传所需的库可在requirements.txt 。 在项目目录中时, pip install -r requirem
2023-03-15 15:54:19 11.94MB image-classification darknet yolov3 Python
1
2009年新书,非扫描 Contents List of Figures xiii List of Tables xix Introduction xxi About the Editors xxvii Contributor List xxix 1 Analysis of Text Patterns Using Kernel Methods 1 Marco Turchi, Alessia Mammone, and Nello Cristianini 1.1 Introduction . . . . . . . . . . . . . . . 1 1.2 General Overview on Kernel Methods . . . . . . . 1 1.2.1 Finding Patterns in Feature Space . . . . . . . . . . . 5 1.2.2 Formal Properties of Kernel Functions . . . . . . . . . 8 1.2.3 Operations on Kernel Functions . . . . . . . . . . . . 10 1.3 Kernels for Text . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.1 Vector SpaceModel . . . . . . . . . . . . . . . . . . . 11 1.3.2 Semantic Kernels . . . . . . . . . . . . . . . . . . . . . 13 1.3.3 String Kernels . . . . . . . . . . . . . . . . . . . . . . 17 1.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 1.5 Conclusion and Further Reading . . . . . . . . . . . . . . . . 22 2 Detection of Bias in Media Outlets with Statistical Learning Methods 27 Blaz Fortuna, Carolina Galleguillos, and Nello Cristianini 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.2 Overview of the Experiments . . . . . . . . . . . . . . . . . . 29 2.3 Data Collection and Preparation . . . . . . . . . . . . . . . . 30 2.3.1 Article Extraction from HTML Pages . . . . . . . . . 31 2.3.2 Data Preparation . . . . . . . . . . . . . . . . . . . . . 31 2.3.3 Detection of Matching News Items . . . . . . . . . . . 32 2.4 News Outlet Identification . . . . . . . . . . . . . . . . . . . . 35 2.5 Topic-Wise Comparison of Term Bias . . . . . . . . . . . . . 38 2.6 News OutletsMap . . . . . . . . . . . . . . . . . . . . . . . . 40 2.6.1 Distance Based on Lexical Choices . . . . . . . . . . . 42 vii © 2009 by Taylor and Francis Group, LLC viii 2.6.2 Distance Based on Choice of Topics . . . . . . . . . . 43 2.7 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.9 Appendix A: Support Vector Machines . . . . . . . . . . . . . 48 2.10 Appendix B: Bag of Words and Vector Space Models . . . . . 48 2.11 Appendix C: Kernel Canonical Correlation Analysis . . . . . 49 2.12 Appendix D: Multidimensional Scaling . . . . . . . . . . . . . 50 3 Collective Classification for Text Classification 51 Galileo Namata, Prithviraj Sen, Mustafa Bilgic, and Lise Getoor 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.2 Collective Classification: Notation and Problem Definition . . 53 3.3 Approximate Inference Algorithms for Approaches Based on Local Conditional Classifiers . . . . . . . . . . . . . . . . . . . 53 3.3.1 Iterative Classification . . . . . . . . . . . . . . . . . . 54 3.3.2 Gibbs Sampling . . . . . . . . . . . . . . . . . . . . . . 55 3.3.3 Local Classifiers and Further Optimizations . . . . . . 55 3.4 Approximate Inference Algorithms for Approaches Based on Global Formulations . . . . . . . . . . . . . . . . . . . . . . . 56 3.4.1 Loopy Belief Propagation . . . . . . . . . . . . . . . . 58 3.4.2 Relaxation Labeling via Mean-Field Approach . . . . 59 3.5 Learning the Classifiers . . . . . . . . . . . . . . . . . . . . . 60 3.6 Experimental Comparison . . . . . . . . . . . . . . . . . . . . 60 3.6.1 Features Used . . . . . . . . . . . . . . . . . . . . . . . 60 3.6.2 Real-World Datasets . . . . . . . . . . . . . . . . . . . 60 3.6.3 Practical Issues . . . . . . . . . . . . . . . . . . . . . . 63 3.7 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.9 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 66 4 Topic Models 71 David M. Blei and John D. Lafferty 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2 Latent Dirichlet Allocation . . . . . . . . . . . . . . . . . . . 72 4.2.1 Statistical Assumptions . . . . . . . . . . . . . . . . . 73 4.2.2 Exploring a Corpus with the Posterior Distribution . . 75 4.3 Posterior Inference for LDA . . . . . . . . . . . . . . . . . . . 76 4.3.1 Mean Field Variational Inference . . . . . . . . . . . . 78 4.3.2 Practical Considerations . . . . . . . . . . . . . . . . . 81 4.4 Dynamic Topic Models and Correlated Topic Models . . . . . 82 4.4.1 The Correlated Topic Model . . . . . . . . . . . . . . 82 4.4.2 The Dynamic Topic Model . . . . . . . . . . . . . . . 84 4.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 © 2009 by Taylor and Francis Group, LLC ix 5 Nonnegative Matrix and Tensor Factorization for Discussion Tracking 95 Brett W. Bader, Michael W. Berry, and Amy N. Langville 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.1.1 Extracting Discussions . . . . . . . . . . . . . . . . . . 96 5.1.2 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . 96 5.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5.3 Tensor Decompositions and Algorithms . . . . . . . . . . . . 98 5.3.1 PARAFAC-ALS . . . . . . . . . . . . . . . . . . . . . 100 5.3.2 Nonnegative Tensor Factorization . . . . . . . . . . . . 100 5.4 Enron Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 5.4.1 TermWeighting Techniques . . . . . . . . . . . . . . . 103 5.5 Observations and Results . . . . . . . . . . . . . . . . . . . . 105 5.5.1 Nonnegative Tensor Decomposition . . . . . . . . . . . 105 5.5.2 Analysis of Three-Way Tensor . . . . . . . . . . . . . 106 5.5.3 Analysis of Four-Way Tensor . . . . . . . . . . . . . . 108 5.6 Visualizing Results of the NMF Clustering . . . . . . . . . . . 111 5.7 FutureWork . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 6 Text Clustering with Mixture of von Mises-Fisher Distributions 121 Arindam Banerjee, Inderjit Dhillon, Joydeep Ghosh, and Suvrit Sra 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 6.2 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 6.3 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 6.3.1 The von Mises-Fisher (vMF) Distribution . . . . . . . 124 6.3.2 Maximum Likelihood Estimates . . . . . . . . . . . . . 125 6.4 EMon aMixture of vMFs (moVMF) . . . . . . . . . . . . . . 126 6.5 Handling High-Dimensional Text Datasets . . . . . . . . . . . 127 6.5.1 Approximating κ . . . . . . . . . . . . . . . . . . . . . 128 6.5.2 Experimental Study of the Approximation . . . . . . . 130 6.6 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6.7 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . 134 6.7.1 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6.7.2 Methodology . . . . . . . . . . . . . . . . . . . . . . . 138 6.7.3 Simulated Datasets . . . . . . . . . . . . . . . . . . . . 138 6.7.4 Classic3 Family of Datasets . . . . . . . . . . . . . . . 140 6.7.5 Yahoo News Dataset . . . . . . . . . . . . . . . . . . . 143 6.7.6 20 Newsgroup Family of Datasets . . . . . . . . . . . . 143 6.7.7 Slashdot Datasets . . . . . . . . . . . . . . . . . . . . 145 6.8 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 6.9 Conclusions and Future Work . . . . . . . . . . . . . . . . . . 148 © 2009 by Taylor and Francis Group, LLC x 7 Constrained Partitional Clustering of Text Data: An Overview 155 Sugato Basu and Ian Davidson 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 7.2 Uses of Constraints . . . . . . . . . . . . . . . . . . . . . . . . 157 7.2.1 Constraint-Based Methods . . . . . . . . . . . . . . . 157 7.2.2 Distance-BasedMethods . . . . . . . . . . . . . . . . . 158 7.3 Text Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . 159 7.3.1 Pre-Processing . . . . . . . . . . . . . . . . . . . . . . 161 7.3.2 DistanceMeasures . . . . . . . . . . . . . . . . . . . . 162 7.4 Partitional Clustering with Constraints . . . . . . . . . . . . 163 7.4.1 COP-KMeans . . . . . . . . . . . . . . . . . . . . . . . 163 7.4.2 Algorithms with Penalties – PKM, CVQE . . . . . . . 164 7.4.3 LCVQE: An Extension to CVQE . . . . . . . . . . . . 167 7.4.4 Probabilistic Penalty – PKM . . . . . . . . . . . . . . 167 7.5 Learning Distance Function with Constraints . . . . . . . . . 168 7.5.1 Generalized Mahalanobis Distance Learning . . . . . . 168 7.5.2 Kernel Distance Functions Using AdaBoost . . . . . . 169 7.6 Satisfying Constraints and Learning Distance Functions . . . 170 7.6.1 Hidden Markov Random Field (HMRF) Model . . . . 170 7.6.2 EMAlgorithm . . . . . . . . . . . . . . . . . . . . . . 173 7.6.3 Improvements to HMRF-KMeans . . . . . . . . . . . 173 7.7 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7.7.1 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7.7.2 Clustering Evaluation . . . . . . . . . . . . . . . . . . 175 7.7.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . 176 7.7.4 Comparison of Distance Functions . . . . . . . . . . . 176 7.7.5 Experimental Results . . . . . . . . . . . . . . . . . . 177 7.8 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 8 Adaptive Information Filtering 185 Yi Zhang 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 8.2 Standard EvaluationMeasures . . . . . . . . . . . . . . . . . 188 8.3 Standard Retrieval Models and Filtering Approaches . . . . . 190 8.3.1 Existing Retrieval Models . . . . . . . . . . . . . . . . 190 8.3.2 Existing Adaptive Filtering Approaches . . . . . . . . 192 8.4 CollaborativeAdaptive Filtering . . . . . . . . . . . . . . . . 194 8.5 Novelty and Redundancy Detection . . . . . . . . . . . . . . . 196 8.5.1 Set Difference . . . . . . . . . . . . . . . . . . . . . . . 199 8.5.2 Geometric Distance . . . . . . . . . . . . . . . . . . . 199 8.5.3 Distributional Similarity . . . . . . . . . . . . . . . . . 200 8.5.4 Summary of Novelty Detection . . . . . . . . . . . . . 201 8.6 Other Adaptive Filtering Topics . . . . . . . . . . . . . . . . 201 8.6.1 Beyond Bag ofWords . . . . . . . . . . . . . . . . . . 202 © 2009 by Taylor and Francis Group, LLC xi 8.6.2 Using Implicit Feedback . . . . . . . . . . . . . . . . . 202 8.6.3 Exploration and Exploitation Trade Off . . . . . . . . 203 8.6.4 Evaluation beyond Topical Relevance . . . . . . . . . 203 8.7 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 204 9 Utility-Based Information Distillation 213 Yiming Yang and Abhimanyu Lad 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 9.1.1 Related Work in Adaptive Filtering (AF) . . . . . . . 213 9.1.2 Related Work in Topic Detection and Tracking (TDT) 214 9.1.3 Limitations of Current Solutions . . . . . . . . . . . . 215 9.2 A Sample Task . . . . . . . . . . . . . . . . . . . . . . . . . . 216 9.3 Technical Cores . . . . . . . . . . . . . . . . . . . . . . . . . . 218 9.3.1 Adaptive Filtering Component . . . . . . . . . . . . . 218 9.3.2 Passage Retrieval Component . . . . . . . . . . . . . . 219 9.3.3 Novelty Detection Component . . . . . . . . . . . . . 220 9.3.4 Anti-Redundant Ranking Component . . . . . . . . . 220 9.4 EvaluationMethodology . . . . . . . . . . . . . . . . . . . . . 221 9.4.1 Answer Keys . . . . . . . . . . . . . . . . . . . . . . . 221 9.4.2 Evaluating the Utility of a Sequence of Ranked Lists . 223 9.5 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 9.6 Experiments and Results . . . . . . . . . . . . . . . . . . . . . 226 9.6.1 Baselines . . . . . . . . . . . . . . . . . . . . . . . . . 226 9.6.2 Experimental Setup . . . . . . . . . . . . . . . . . . . 226 9.6.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . 227 9.7 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . 229 9.8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 229 10 Text Search-Enhanced with Types and Entities 233 Soumen Chakrabarti, Sujatha Das, Vijay Krishnan, and Kriti Puniyani 10.1 Entity-Aware Search Architecture . . . . . . . . . . . . . . . . 233 10.1.1 Guessing Answer Types . . . . . . . . . . . . . . . . . 234 10.1.2 Scoring Snippets . . . . . . . . . . . . . . . . . . . . . 235 10.1.3 Efficient Indexing and Query Processing . . . . . . . . 236 10.1.4 Comparison with Prior Work . . . . . . . . . . . . . . 236 10.2 Understanding the Question . . . . . . . . . . . . . . . . . . . 236 10.2.1 Answer Type Clues in Questions . . . . . . . . . . . . 239 10.2.2 Sequential Labeling of Type Clue Spans . . . . . . . . 240 10.2.3 From Type Clue Spans to Answer Types . . . . . . . . 245 10.2.4 Experiments . . . . . . . . . . . . . . . . . . . . . . . 247 10.3 Scoring Potential Answer Snippets . . . . . . . . . . . . . . . 251 10.3.1 A ProximityModel . . . . . . . . . . . . . . . . . . . . 253 10.3.2 Learning the Proximity Scoring Function . . . . . . . 255 10.3.3 Experiments . . . . . . . . . . . . . . . . . . . . . . . 257 10.4 Indexing and Query Processing . . . . . . . . . . . . . . . . . 260 © 2009 by Taylor and Francis Group, LLC xii 10.4.1 Probability of a Query Atype . . . . . . . . . . . . . . 262 10.4.2 Pre-Generalize and Post-Filter . . . . . . . . . . . . . 262 10.4.3 Atype Subset Index Space Model . . . . . . . . . . . . 265 10.4.4 Query Time BloatModel . . . . . . . . . . . . . . . . 266 10.4.5 Choosing an Atype Subset . . . . . . . . . . . . . . . . 269 10.4.6 Experiments . . . . . . . . . . . . . . . . . . . . . . . 271 10.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 10.5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . 272 10.5.2 Ongoing and Future Work . . . . . . . . . . . . . . . . 273 © 2009
2023-03-15 13:41:22 4.35MB 文本挖掘 分类 聚类
1
胶囊网络的文本分类 EMNLP18接受了我们的论文的实现。 要求:代码是用Python(2.7)编写的,并且需要Tensorflow(1.4.1)。 链接到我们最近的胶囊项目: : ACL19预印本: 资料准备 reuters_process.py提供了清除原始数据并生成Reuters-Multilabel和Reuters-Full数据集的功能。 若要快速入门,请参阅以获取Reuters-Multilabel数据集。 对于其他数据集,请访问。 更多说明 utils.py包含几个包装的基本功能,例如_conv2d_wrapper,_separable_conv2d_wrapper和_get_variable_wrapper等。 这些layers.py实现的胶囊网络包括主胶囊层,卷积胶囊层,胶囊扁平化层和FC胶囊层。 network.py提供了两种胶囊网络的实现以及用于比较的基
2023-03-09 10:35:03 13KB Python
1
让我们从具有Amazon产品评论的数据集开始,构建结构化的类:6个“级别1”类,64个“级别2”类和510个“级别3”类。探索用于分层文本分类的各种方法。 train_40k.csv unlabeled_150k.csv val_10k.csv
2023-03-07 22:34:42 37.3MB 数据集
1
基于分词与BP网络的文本分类 首先下载整个文件,BP文本分类-语义特征提取.rar主要存放了相关的数据集 代码主要包括: 1.特征提取 首先对文本信息进行分词处理,采用基于字符串匹配的方法: 依次截取一到多个词,并与字典库进行匹配。如二狗,如果匹配到字典中有这个词,则将其分为一个词;发现字典中没有与之匹配的,则说明这个不是一个词语,进行顺序操作, 2.得到分词后的文本之后,就是转换成数字编码,因此电脑没办法识别汉字。这一部分叫特征表示,即用数字的方式表示中文文本,采用的方法是基于词带模型的特征表示 3.通过2我们将文本表示成了数字,但是这样的表示通常都是稀疏的,为此我们利用降维方法,消除掉这些冗余特征。 4. 文本分类,采用的就是bp网络(1)如pca的降维数,维数过高,包含冗余数据,过低又会删除掉重要信息。(2)bp网络结构的调整,如隐含层节点数,学习率等
2023-03-06 10:05:56 3.48MB BP神经网络 文本分类器 MATLAB
1
GoEmotions火炬手 使用实现Pytorch实现 什么是GoEmotions 数据集以28种情感标记为58000个Reddit评论 钦佩,娱乐,愤怒,烦恼,批准,关怀,困惑,好奇心,欲望,失望,不赞成,厌恶,尴尬,兴奋,恐惧,感激,悲伤,喜悦,爱,紧张,乐观,骄傲,意识到,缓解,后悔,悲伤,惊喜+中立 训练细节 使用基于bert-base-cased (与论文的代码相同) 在本文中,使用了3种分类法。 我还使用用于分类hierarchical grouping和ekman新分类标签制作了数据。 原始GoEmotions (27种情感+中性) 分层分组(正,负,模棱两可+中性) 艾克曼(愤怒,厌恶,恐惧,喜悦,悲伤,惊奇+中立) 词汇 我已分别将[unused1] , [unused2]替换为[NAME]和[RELIGION] 。 [PAD] [NAME] [RELIGI
1
Chatbot_CN 基于深度学习、强化学习、对话引擎的多场景对话机器人 • • • • • • • • Made by Xu • :globe_with_meridians: 项目说明     Chatbot_CN 是一个基于第三代对话系统的多轮对话机器人项目,旨在于开发一个结合规则系统、深度学习、强化学习、知识图谱、多轮对话策略管理的 聊天机器人,目前随着时间的慢慢发展,从最初的一个 Chatbot_CN 项目,发展成了一个 Chatbot_* 的多个项目。目前已经包含了在多轮任务型对话的场景中,基于话术(Story)、知识图谱(K-G)、端到端对话(E2E)。目的是为了实现一个可以快速切换场景、对话灵活的任务型机器人。 同时,Chatbot_CN 不仅仅是一个对话系统,而是一套针对客服场景下的完整人工智能解决方案。对话是解决方案的核心和最重要一环,但不仅限于对话,还包括智能决策
1
Matlab R2012b代码声场分类 描述 这是对IEEE AASP挑战:声音场景和事件的检测和分类的提交。 场景分类(SC)挑战由10个不同的场景组成,每个场景包含10个音频文件,每个文件的长度为30秒,总共有100个音频剪辑。 场景列表是:繁忙的街道,安静的街道,公园,露天市场,公共汽车,地铁,餐厅,商店/超市,办公室和地铁站。 目标是在由与训练集相同场景的音频片段组成的开发集上进行测试,并确定音频片段来自哪个场景。 这里开发了两种算法:第一种基于隐马尔可夫模型(HMM)和高斯混合模型(GMM)。 使用的功能包括短时傅立叶变换,响度和频谱稀疏性。 第二种算法在基于帧的级别上应用支持向量机(SVM)。 有关AASP挑战的完整信息,请访问: 此处的所有代码均根据MIT许可免费提供。 设置 确保提供的所有文件和文件夹都在MATLAB的当前路径中。 设置模式识别工具箱(PRT): 下载PRT: 在MATLAB控制台中运行prtSetup 。 如果您的MATLAB安装中未设置MEX,请首先确保存在受支持的编译器(),然后运行mex -setup 。 运行prtSetupMex 。 样本数据
2023-03-01 13:16:36 166KB 系统开源
1
Machine Learning, Neural and Statistical Classification
2023-02-09 21:59:58 1.7MB Machine Learning
1