Giter Site home page Giter Site logo

aka-zyq / - Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lhyljyt/-

0.0 0.0 0.0 1 KB

确定需要的变量,并使用相关数据库。建立字典、列表(names、relationship、line_names)储存名字,关系。在此之前需要建立一个关于《黎明破晓的街道》的主要角色名称TXT文档,我将之命名为Introduction to key people.txt 。文本中实体识别。读入《黎明破晓的街道》剧本的每一行,对其做分词,判断该词的词性是不是“人名”(nr作用:判断是否是人名),提取每段人物,存入line_names。根据识别结果构建网络。对于 lineNames 中每一行,我们为该行中出现的所有人物两两相连。如果两个人物之间尚未有边建立,则将新建的边权值设为 1,否则将已存在的边的权值加 1。这种方法将产生很多的冗余边,这些冗余边将在最后处理。过滤冗余边。将已经建好的 names 和 relationships 输出到文本,以方便 gephi 可视化处理。输出边的过程中可以过滤可能是冗余的边,这里假设共同出现次数少于 10 次的是冗余边,则在输出时跳过这样的边。输出结果。由于gephi导入电子表格,故生成文件扩展名为csv。输出的节点集合保存为 黎明破晓的街道_node.csv ,边集合保存为 黎明破晓的街道_edge.csv。运行。会在相应文件夹python综合项目中生成黎明破晓的街道_node.csv、黎明破晓的街道_edge.csv 。使用gephi生成可视化网络。

Python 100.00%

-'s People

Contributors

lhyljyt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.