Java – implements common context search – how do you handle it?

I'm currently designing some desktop software. I've always wanted to realize intuitive search function For example, I need to write an algorithm to parse search queries, such as "2 p.m. to 3 p.m. next Monday" or "any time after 2 p.m. on Friday", or even "how do I use it" So the context may be very different, but to ask the same thing, that's what I mean

Should I tag the query (I have so far), or should I treat the string as an entire schema and compare it to some type of library?

I'm not sure if so is suitable for this, so please point out the right direction if necessary Basically, I just want to make some suggestions on the methods I should adopt

thank you.

Solution

Temporal Extraction (i.e. Extract date/time entities from free form text) – How? May give you some instructions

"Entity extraction" is the process of extracting human identifiable entities (name, place, date, etc.) from unstructured text That article specifically deals with temporal entities, but generally speaking, reading "entity extraction" is a good starting point

Entity extraction must be per language, so it will be difficult to try to internationalize the product to other locales For Google Calendar, we spend a lot of time extracting time entities and expressing recursive relationships in human readable form ("November last Friday"), and each of the 40 locales we operate has its own quirks

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>