@datagica/parse-birthdates

0.0.2 • Public • Published

parse-birthdates

const parse = require('@datagica/parse-birthdates')
await parse('age: 77 years old')

will output:

[
      {
        "ngram": "age: 77",
        "value": {
          "id": "birthdate-1941-02-01",
          "label": {
            "en": "1941-02-01"
          },
          "date": "1941-02-01",
          "age": 77,
          "keywords": {
            "en": [
              "birthday",
              "birth date",
              "age"
            ],
            "fr": [
              "âge",
              "date de naissance"
            ]
          }
        },
        "score": 1,
        "position": {
          "sentence": 0,
          "word": 2,
          "begin": 7,
          "end": 14
        }
      }
    ]

Readme

Keywords

none

Package Sidebar

Install

npm i @datagica/parse-birthdates

Weekly Downloads

5

Version

0.0.2

License

GPL-3.0

Unpacked Size

10.7 kB

Total Files

9

Last publish

Collaborators

  • datagica