Giter Site home page Giter Site logo

Comments (2)

dongrixinyu avatar dongrixinyu commented on May 17, 2024 1

这种应该使用

import jionlp as jio
jio.ner.extract_time('中午的两点一刻定一个闹铃')
  • 使用建议:
  • parse_time 是用来解析一个纯净准确的时间字符串的,比如“中午两点一刻”,不建议再带上下文其它信息。
  • extract_time 首先抽取出时间字符串,然后再调用 parse_time 进行解析,解析前做了预处理,“的”这种词会被预处理掉。extract_time 的输入文本可以是一整段话,它会将其中所有的时间抽取出来。
  • 由于上述都是采用规则来完成的,自然存在一些上下文应付不了的情况。
  • 所以最建议的方式是,自行训练一个高质量的时间类别NER,然后对字符串做预处理,然后调用 parse_time进行解析。

from jionlp.

sjk7524068 avatar sjk7524068 commented on May 17, 2024

这种应该使用

import jionlp as jio
jio.ner.extract_time('中午的两点一刻定一个闹铃')
  • 使用建议:
  • parse_time 是用来解析一个纯净准确的时间字符串的,比如“中午两点一刻”,不建议再带上下文其它信息。
  • extract_time 首先抽取出时间字符串,然后再调用 parse_time 进行解析,解析前做了预处理,“的”这种词会被预处理掉。extract_time 的输入文本可以是一整段话,它会将其中所有的时间抽取出来。
  • 由于上述都是采用规则来完成的,自然存在一些上下文应付不了的情况。
  • 所以最建议的方式是,自行训练一个高质量的时间类别NER,然后对字符串做预处理,然后调用 parse_time进行解析。

感谢这么详细的回复,开始尝试用ner解析,有利有弊吧,ner解析出来的结果里包含了多个时间结果,需要做相应的一些处理

from jionlp.

Related Issues (20)

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.