自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 收藏
  • 关注

原创 ImportError: torch>=1.5.0 is required for a normal functioning of this module, but found torch==1.4.

问题描述执行代码时出现ImportError: torch>=1.5.0 is required for a normal functioning of this module, but found torch==1.4.0.原因分析:之前安装的torch=1.4.0相关的依赖没有删除干净,导致冲突。解决方案:将torch=1.4.0相关依赖删除,主要是在anaconda\pkgs和anaconda\Lib\site-packages文件夹中。...

2022-04-06 08:16:58 2834

原创 使用Bert预训练模型生成词嵌入

import torchfrom torch import nnfrom pytorch_transformers import BertModel# 预训练模型存储位置pretrained_path = 'bert-base-chinese/'class use_Bert(nn.Module): def __init__(self): super(use_Bert,self).__init__() self.bert = BertModel.from_

2021-12-10 20:03:07 2229

原创 CRF维度问题

在学习BiLSTM+CRF进行NER任务时,处理样本数据遇到维度问题,参考GitHub代码后解决,以计算正确实例的路径分数为例all_scores:(batch_size,length,label_size,label_size)all\_scores: (batch\_size, length, label\_size, label\_size)all_scores:(batch_size,length,label_size,label_size)all_scores[i][j][k][m]all\_

2021-11-07 17:03:51 250 3

原创 Document-Level Relation Extraction with Adaptive Thresholding and Localized Context Pooling 阅读笔记

Document-Level Relation Extraction with Adaptive Thresholding and Localized Context PoolingPurposeEnhanced BERT BaselineEncoderBinary ClassifierAdaptive ThresholdingLocalized Context PoolingConclusionPurpose本文提出两种新的技术,分别为自适应阈值和局部上下文池化,解决多标签和多实体问题。自适应阈值利用

2021-09-20 16:36:09 368

原创 Entity Structure Within and Throughout: Modeling Mention Dependencies for Document-Level Relation Ex

Entity Structure Within and Throughout: Modeling Mention Dependencies for Document-Level Relation ExtractionPurposeApproachEntity StructureSSANTransformation ModuleSSAN for Relation ExtractionPurpose实体作为关系抽取的基本要素,具有特定的结构。本文中作者将其表述为提及对之间的独特依赖关系,并提出了SSAN(结

2021-09-18 20:11:48 657

原创 EIDER: Evidence-enhanced Document-level Relation Extraction阅读笔记

EIDER: Evidence-enhanced Document-level Relation ExtractionBackgroundPurposeMethodologyJoint Relation and Evidence ExtractionEvidence-centered Relation ExtractionFusion of Extraction ResultsBackground文档级关系抽取的目的是提取文档中实体对之间的关系,文档中的推断关系所需的最小句子集称为“evidence s

2021-09-13 16:47:00 714 3

原创 re.findall(‘.{‘ + str(num) + ‘}‘, text)

项目场景:今天在阅读代码时发现了re.findall('.{' + str(num) + '}', text)网上查询无果后自己进行测试,发现该函数的作用是以num长度截取text文本。实验:import retext = '你都如何回忆我,带着笑或是很沉默'segment = re.findall('.{' + str(3) + '}', text)print(segment)# ['你都如', '何回忆', '我,带', '着笑或', '是很沉']...

2021-07-05 21:50:59 137

原创 ModuleNotFoundError: No module named ‘xxx‘; ‘xxx‘ is not a package解决

问题描述:ModuleNotFoundError: No module named 'kashgari.embeddings'; 'kashgari' is not a package原因分析:python文件的命名与包名重复。解决方案:提示:这里填写该问题的具体解决方案:例如:新建一个 Message 对象,并将读取到的数据存入 Message,然后 mHandler.obtainMessage(READ_DATA, bytes, -1, buffer).sendToTarget();换成

2021-07-05 16:09:07 777

原创 基于BERT的命名实体识别——BERT微调初次实践

基于BERT的命名实体识别目标任务数据集格式构造训练样本get_examplesInputExample_create_exampleget_train_examples将token和label转为id并结构化convert_single_example建立分类模型create_model训练模型评估模型目标任务针对提供的数据进行命名实体识别,标注出每个token对应的label。其中label包括BIO_token_labels = ['TREATMENT-I', 'TREATMENT-B', '

2021-07-02 12:18:15 1648

原创 TTPDrill: Automatic and Accurate Extraction of Threat Actions from Unstructured Text of CTI Sources

TTPDrill: Automatic and Accurate Extraction of Threat Actions from Unstructured Text of CTI Sources 阅读笔记PurposeOverviewThreat Action OntologyThreat Action Extraction and AnalysisScraping and PreprocessingThreat Action IdentificationThreat Action Mapping an

2021-06-17 11:04:04 1039 2

原创 A System for Automated Open-Source Threat Intelligence Gathering and Management 阅读笔记

A System for Automated Open-Source Threat Intelligence Gathering and Management 阅读笔记BackgroundPurposeArchitectureBackend System DesignOSCTI Reports CollectionSecurity Knowledge Ontology DesignSecurity Knowledge ExtractionSecurity Knowledge Graph Construct

2021-06-16 00:29:40 404

原创 CyberSecurity Knowledge Base笔记

CSKB: A Cyber Security Knowledge Base Based on Knowledge Graph阅读笔记PurposeBackgroundOntology ConstructionProcess of Ontology ConstructionDescription of OntologyOntology implementationImplementation of CSKBKnowledge Acquisition and Knowledge Fusion/Extractio

2021-05-26 16:35:58 581 1

原创 Quantifying the Significance and Relevance of Cyber-Security Text Through Textual Similarity阅读笔记

Quantifying the Significance and Relevance of Cyber-Security Text Through Textual Similarity and Cyber-Security Knowledge Graph阅读笔记PurposeProposed Autonomous SystemsProposed System ArchitectureNatural Language Filter ModuleAnalyzer ModuleImplementationDat

2021-05-22 08:51:30 194

原创 Early Detection of Cybersecurity Threats Using Collaborative Cognition阅读笔记

Early Detection of Cybersecurity Threats Using Collaborative Cognition阅读笔记BackgroundPurposeCognitive Approach to CybersecurityAttack ModelSystem ArchitectureCognitive CyberSecurity ModuleIntel-Aggregate ModuleProof of Concept ImplementationConclusionBackg

2021-05-20 15:36:17 229 1

原创 Cyber-All-Intel: An AI for Security related Threat Intelligence阅读笔记

Cyber-All-Intel: An AI for Security related Threat Intelligence阅读笔记PurposeMethodsCybersecurity SourcesSystem Pipeline & ArchitectureThe VKG StructureCybersecurity Knowledge ImprovementImproving the Knowledge Graph Using Vector EmbeddingsImproving Vecto

2021-05-19 10:15:16 707

原创 Mining Threat Intelligence about Open-Source Projects and Libraries from Code Repository Issues阅读笔记

Mining Threat Intelligence about Open-Source Projects and Libraries from Code Repository Issues and Bug Reports阅读笔记ArticlePurposeMethodsInitializing a Security Knowledge GraphTracking Installed Software & Mining Library LinkingBug & Issue TrackingA

2021-05-17 11:45:54 191

原创 TransE模型-数据预处理

TransE模型-数据预处理源代码数据说明代码解释源代码源代码参考项目数据说明数据集采用FB15K,下面代码中的文件分别为:file1:训练集,格式为(head,relation,tail)例:/m/027rn /location/country/form_of_government /m/06cx9/m/017dcd /tv/tv_program/regular_cast./tv/regular_tv_appearance/actor /m/06v8s0/m/07s9rl0 /media

2021-05-12 17:42:52 1366 7

原创 DeepWeak: Reasoning Common Software Weaknesses via Knowledge Graph Embedding 阅读笔记

DeepWeak: Reasoning Common Software Weaknesses via Knowledge Graph Embedding 阅读笔记ArticleBackgroundPurposeMethodsExperimentBaselinesHyperparametersCWE Link PredictionCWE Triple ClassificationCommon Consequences PredictionConclusionArticleDeepWeak: Reasoni

2021-05-11 21:16:50 566 1

原创 Bridging Text and Knowledge with Multi-Prototype Embedding for Few-Shot Relational Triple 阅读笔记

Bridging Text and Knowledge with Multi-Prototype Embedding for Few-Shot Relational Triple Extraction 阅读笔记ArticleBackgroundPurposeMethodologiesProblem DefinitionFrameworkInstance EncoderHybrid Prototypical LearningPrototype-Aware RegularizationExperimentsCo

2021-05-08 23:46:41 464 1

原创 A Practical Approach to Constructing a Knowledge Graph for Cybersecurity 阅读笔记

A Practical Approach to Constructing a Knowledge Graph for Cybersecurity 阅读笔记ArticleBackgroundPurposeFramework DesignKnowledge deductionAttribute deductionRelationship deductionConclusionArticleA Practical Approach to Constructing a Knowledge Graph for C

2021-05-08 00:06:07 598

原创 RelExt: Relation Extraction using Deep Learning approaches for Cybersecurity Knowledge Graph 阅读笔记

RelExt: Relation Extraction using Deep Learning approaches for Cybersecurity Knowledge Graph Improvement 阅读笔记ArticleBackgroundPurposeCybersecurity Knowledge GraphSystem ArchitectureExperimentCorpusEvaluationsConclusionArticleRelExt: Relation Extraction u

2021-05-07 12:34:41 739

原创 keras.layers.Embedding及加载预训练word2vec

keras.layers.Embedding主要参数:input_dim:词汇表的大小,即len(vocab)output_dim:嵌入向量的维度input_length:输入样本的长度输入尺寸:(batch_size, input_length)输出尺寸:(batch_size, input_length, output_dim)示例from keras.models import Sequentialfrom keras.layers import Embeddingimport n

2021-04-21 12:58:54 2323

原创 keras.model.Sequential

keras.model.SequentialSequential是序列模型,是模型的线性组合,可以按照顺序依次添加相应的网络层。在第一层中需要指定输入的尺寸,其余层中不必指定,模型能够自动推导中间过程的尺寸。model = Sequential()model.add(Dense(32, input_shape=(500,)))# 与上面的代码等价model = Sequential()model.add(Dense(32, input_dim=500))# 与上面的代码等价model =

2021-04-21 10:11:57 2670 3

原创 Nugget Proposal Networks for Chinese Event Detection阅读总结

Nugget Proposal Networks for Chinese Event Detection阅读总结BackgroundPurposeHybrid Representation LearningToken-level Representation LearningHybrid Representation LearningNugget Proposal NetworksTrigger Nugget GeneratorEvent Type ClassifierDealing with Confli

2021-04-20 12:58:44 246 1

原创 DCFEE: A Document-level Chinese Financial Event Extraction System 阅读笔记

DCFEE: A Document-level Chinese Financial Event Extraction System based on Automatically Labeled Training Data 阅读笔记BackgroundPurposeMethodologyData GenerationEvent ExtractionEvaluationDatasetPerformance of the SystemApplicationConclusionBackground在金融、医疗、

2021-04-15 09:39:13 575

原创 paddlenlp.layers.LinearChainCrf源码解析

paddlenlp.layers.LinearChainCrf源码解析动机def __init__(self, num_labels, crf_lr=0.1, with_start_stop_tag=True)参数理解def _initialize_alpha(self, batch_size):lossdef forward(self, inputs, lengths)动机第一次参加信息抽取相关的竞赛,在跑通官方提供的baseline之后,尝试在其预训练模型的基础上添加其他的网络层,于是选用了Bi-G

2021-04-10 00:33:17 660 1

原创 ModuleNotFoundError: No module named ‘paddlehub.dataset.base_nlp_dataset‘解决

项目场景:项目场景:在paddlehub中使用语义预训练模型ERNIE优化文新闻本分类问题描述:from paddlehub.dataset.base_nlp_dataset import BaseNLPDataset导入dataset.base_nlp_dataset时报错:ModuleNotFoundError: No module named 'paddlehub.dataset.base_nlp_dataset' 原因分析:paddlehub 2.2.0中用datase

2021-04-06 08:47:58 2773 4

原创 Biomedical Event Extraction as Sequence Labeling 阅读总结

Biomedical Event Extraction as Sequence Labeling阅读总结PurposeBackgroundEncoding Event StructuresEvent StructuresSequence Labeling EncodingEvent Extraction as Sequence LabelingMulti-task StrategiesMulti-label DecoderExperimental and ResultsConclusionPurpose

2021-04-05 13:50:48 588

原创 TriggerNER: Learning with Entity Triggers as Explanations for Named Entity Recognition 阅读总结

TriggerNER: Learning with Entity Triggers as Explanations for Named Entity Recognition 阅读总结PurposeBackgroundMethodsTrigger Encodeing & Semantic MatchingTrigger-Enhanced Sequence TaggingInference on Unlabelled SentenceExperiment and ResultsAnnotating an

2021-04-03 21:48:49 471

原创 Document-Level Event Role Filler Extraction using Multi-Granularity Contextualized Encoding阅读笔记

Document-Level Event Role Filler Extraction using Multi-Granularity Contextualized Encoding阅读笔记PurposeBackgroundMethodsConstructing Paired Token-tag Sequences from Documents and Gold Role Fillersk-sentence ReaderMulti-Granularity ReaderResultsConclusionsP

2021-04-02 09:50:58 877 1

原创 A Novel Cascade Binary Tagging Framework for Relational Triple Extraction 阅读总结

A Novel Cascade Binary Tagging Framework for Relational Triple Extraction 阅读总结PurposeBackgroundMethodsBERT EncoderCacade DecoderResultsConclusionsPurpose作者引入一个新的角度重新审视关系抽取任务,并提出了一个新的二元标记框架CASREL,该框架是由公式推导而来的。将关系建模为函数,将subject映射到object,从而解决了重叠问题。在这个框架下,首先

2021-03-31 23:15:52 580 1

原创 Joint Extraction of Entities and Relations Based on a Novel Tagging Scheme阅读总结

Joint Extraction of Entities and Relations Based on a Novel Tagging Scheme阅读总结PurposeBackgroundPipelineJoint ExtractionEnd-to-EndMethodsThe Tagging SchemePurpose本文首先提出了一种新的标注模式,它包含了实体的信息和它们之间的关系,将联合抽取转换为标注问题。接着基于此研究了不同的基于LSTM的端到端模型对三元组建模,直接抽取实体和关系。另外,还通过

2021-03-28 13:36:20 471 4

原创 CASIE: Extracting Cybersecurity Event Information from Text阅读总结

CASIE: Extracting Cybersecurity Event Information from Text阅读总结PurposeBackground术语解释Methods网络安全事件抽取系统设计和架构ResultsConclusionsCommentsPurpose本文提出了CASIE系统,该系统从文本中提取有关网络安全事件的信息并填充语义模型,其最终目标是集成到网络安全数据的知识图谱中。Background通过从新闻文章中提取网络安全事件,能够帮助我们了解当前的趋势和漏洞,并将其集成到

2021-03-25 00:29:36 1971 7

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除