Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize types #868

Merged
merged 1 commit into from
May 6, 2024
Merged

Localize types #868

merged 1 commit into from
May 6, 2024

Conversation

rlouf
Copy link
Member

@rlouf rlouf commented May 6, 2024

Some types such as zip code, phone number, etc. are locale-dependent. In this PR we introduce a mechanism that allows users to specify the locale:

from outlines import types

types.locale("us").ZipCode
types.locale("us").PhoneNumber

@rlouf rlouf merged commit 4f8433d into outlines-dev:main May 6, 2024
5 checks passed
@rlouf rlouf deleted the localize-types branch May 6, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant