https://github.com/risadams/naticon
A natural language parser for dates and times for .Net written in C#.
https://github.com/risadams/naticon
csharp datetime netcore nlp
Last synced: over 1 year ago
JSON representation
A natural language parser for dates and times for .Net written in C#.
- Host: GitHub
- URL: https://github.com/risadams/naticon
- Owner: risadams
- License: mit
- Created: 2019-01-25T18:03:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-28T15:01:02.000Z (over 7 years ago)
- Last Synced: 2025-01-23T20:53:32.323Z (over 1 year ago)
- Topics: csharp, datetime, netcore, nlp
- Language: C#
- Homepage:
- Size: 1.21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Naticon #
## Introduction ##
A natural language parser Dates and Times for .Net written in C#.
## Usage ##
```csharp
DateTime.Now;
//=> Sun Aug 27 23:18:25 PDT 2006
var parser = new Parser();
parser.Parse("tomorrow");
// => Mon Aug 28 12:00:00 PDT 2006
// Setting context
parser = new Parser(new Options { Context = Pointer.Type.Past });
parser.Parse("monday");
// => Mon Aug 21 12:00:00 PDT 2006
parser = new Parser(new Options { Clock = () => new DateTime(2000, 1, 1)});
parser.Parse("may 27th");
// => Sat May 27 12:00:00 PDT 2000
```
## Credits ##
Forked from the [nChronic](https://github.com/robertwilczynski/nChronic) project which has since been abandoned.
## License ##
Unless specified otherwise all is licensed under the MIT license. See LICENSE for details.