Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

duckling is too aggressive in parsing numbers to years #168

Open
savv opened this issue Nov 1, 2016 · 1 comment
Open

duckling is too aggressive in parsing numbers to years #168

savv opened this issue Nov 1, 2016 · 1 comment

Comments

@savv
Copy link

savv commented Nov 1, 2016

=> (p/parse :en$core "530" [:time])
({:dim :time, :body "530", :value {:type "value", :value "0530-01-01T00:00:00.000-00:01:15", :grain :year, :values ()}, :start 0, :end 3, :latent true})

@savv savv changed the title 530 parses to year 530 duckling is too aggressive in parsing numbers Nov 2, 2016
@savv
Copy link
Author

savv commented Nov 2, 2016

A number of examples:

{ dim: 'time',
  value:
   { type: 'value',
     values: [],
     grain: 'year',
     value: '0645-01-01T00:00:00.000-00:01:15' },
  end: 25,
  start: 22,
  latent: true,
  body: '645' }


{ dim: 'time',
  value:
   { type: 'value',
     values: [],
     grain: 'year',
     value: '0130-01-01T00:00:00.000-00:01:15' },
  end: 3,
  start: 0,
  latent: true,
  body: '130' }
{ dim: 'time',
  value:
   { type: 'value',
     values: [ [Object] ],
     grain: 'year',
     value: '2030-01-01T00:00:00.000Z' },
  end: 8,
  start: 6,
  latent: true,
  body: '30' }


{ dim: 'time',
  value:
   { type: 'value',
     values: [],
     grain: 'year',
     value: '1230-01-01T00:00:00.000-00:01:15' },
  end: 4,
  start: 0,
  body: '1230' }



{ dim: 'time',
  value:
   { type: 'value',
     values: [],
     grain: 'year',
     value: '0530-01-01T00:00:00.000-00:01:15' },
  end: 12,
  start: 9,
  latent: true,
  body: '530' }

And my personal favorite :)

{ dim: 'time',
  value:
   { type: 'value',
     values: [],
     grain: 'year',
     value: '1993-01-01T00:00:00.000Z' },
  end: 15,
  start: 13,
  latent: true,
  body: '-7' }

@savv savv changed the title duckling is too aggressive in parsing numbers duckling parses all numbers to years Nov 2, 2016
@savv savv changed the title duckling parses all numbers to years duckling is too aggressive in parsing numbers to years Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant