Code Monkey home page Code Monkey logo

article-entity's Introduction

提取文章标题中的实体

from article_entity import article_entity

title = "苹果设计师竟是猫奴?为猫设计专属音箱"
content = """6月6号凌晨的苹果全球开发者大会在高考的巨大声势下显得有点悄无声息。这场在库克口中“最大最好的WWDC”到底有什么独特魅力,租机姐姐从中选取了几点来为大家介绍介绍。
        iOS 11
        不知道有没有小伙伴跟租机姐姐一样,嫌麻烦从不升级系统,其实在配置允许的情况下,系统的升级会更好的表现产品的性能。
        iOS 11对于iOS 10,首先最直观的变化就是外观上的变化。
        可以看出iOS11的控制中心从从 iOS 10 的卡片式变成了类似气泡的式样,并且可以实现编辑的功能,用户可以根据自己的使用习惯进行编辑,不得不说还是十分方便的。
        在支付宝和微信支付如此普及的**,14年苹果推出的Apple pay实在是翻不起多大的水花。在iOS 11中,Apple pay总算是可以转账了,你可以在iMessage 里和别人进行现金的转账,功能相当于微信红包。
        虽然功能比微信支付宝落后了很多,但租机姐姐觉得Apple pay真的很方便,靠近有银联闪付标志的读卡器,就可以直接进行指纹支付,不用解除锁屏,也不用打开app,除了覆盖率太低之外没毛病。
        很多爱拍照的小伙伴可能都会面对一个相同的问题,内存不足。作为一个曾经的16G用户,租机姐姐手机里的APP是能少则少,相册里照片是精挑细选删了又删,跟同事表情包斗图再也没赢过。最后还是屈服换了64G,然而现在64G的容量也有点捉襟见肘,只怪自己爱自拍。"""

assert article_entity(title, content) == ['苹果']

测试

$ pip install -r requirements-dev.txt
$ pytest

是如何提取的?

提取在正文中出现次数最多的标题中的词组

License

MIT

article-entity's People

Contributors

shipengtaov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

article-entity's Issues

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.