facebook / facebook/duckling

A particular case where duckling fails to extract a valid credit card number

Open
#680 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.3k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

when I try

```
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text="4111111111111111"&dims="["credit-card-number"]"'
```

I seem to be getting the credit card number captured. And when I continued to test with more sample numbers, I've observed that duckling does not recognize the numbers which are invalid.

But I came across a valid credit card number which duckling was not able to recognize

```
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text="60115564485789458"&dims="["credit-card-number"]"'
```

`60115564485789458` is a 17 digit valid credit card number. I'm not sure what makes this number different from other valid numbers and also if there are more numbers like this.

So I have two questions
1. Does my assumption of "duckling not extracting invalid credit card numbers" always hold true?
2. Can we update the rules to make duckling work for numbers like `60115564485789458`?

thanks for your time :pray:

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two /parse requests with dims set to credit-card-number, comparing the recognized 16-digit value with 60115564485789458. Read the credit-card-number rule and its existing validation behavior, then verify that the 17-digit example is recognized without causing invalid numbers to be accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
payments
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.