@datagica/parse-family

0.0.5 • Public • Published

Parse Family

Your marital status and your children, processed by a machine.

Installation

$ npm install --save @datagica/parse-family

Usage

import parseFamily from "@datagica/parse-family";

parseFamily(INPUT).then(result => {
  if (result == null) {
    console.log("not found")
  } else {
    console.log("found: ", result)
  }
}).catch(err => {
  console.log("invalid input data: "+err)
})

Examples

import parseFamily from "@datagica/parse-family";

parseFamily("married, two children.").then(..).catch(..)
{
  marital: 'married',
  children: 2,
  id: 'married-parent-of-2',
  label: 'married parent'
}

// I'm french. So it can also parse french, bien entendu.
parseFamily("marié, deux enfants.").then(..).catch(..)
{
  marital: 'married',
  children: 2,
  id: 'married-parent-of-2',
  label: 'married parent'
}

TODO

  • the family parser should support more text formats
  • should support more languages, too

Readme

Keywords

none

Package Sidebar

Install

npm i @datagica/parse-family

Weekly Downloads

1

Version

0.0.5

License

GPL-3.0

Last publish

Collaborators

  • datagica