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

Britishize asymmetry with Americanize #61

Closed
AbhinavMadahar opened this issue Sep 23, 2015 · 9 comments
Closed

Britishize asymmetry with Americanize #61

AbhinavMadahar opened this issue Sep 23, 2015 · 9 comments

Comments

@AbhinavMadahar
Copy link

On version 1.1.3

If you try typing in something like

require("nlp_compromise").britishize("color");
> "color"

require("nlp_compromise").britishize("favorite");
> "favorite"

require("nlp_compromise").britishize("internationalization");
> "internationalization"

It just returns whatever the input is.

The americanize function works perfectly fine, though.

Relevant polandball

@AbhinavMadahar
Copy link
Author

Also, it when converting from British to American, it will make "are" to "aer" using the logic that "metre" becomes "meter"

@spencermountain
Copy link
Owner

haha! thanks Abhinav. It is way stronger going one way than the other. I'll take a look at improving this, and that bug, this week.
cheers

@DanielBaird
Copy link

Shot in the dark: maybe try britishise() ?

@spencermountain
Copy link
Owner

with the new api (released this week), it's mostly the same call

var nlp=require("nlp_compromise")
t=nlp.term("favorite")
console.log(t.britishize())

although the asymmetry between britishize and americanize remains. it just needs some work.

@nathanmarks
Copy link
Contributor

@spencermountain Here's a demo with a few terms not working as hoped:

  1. britishization not working
  2. britishization not working
  3. americanization works
  4. americanization incorrect

https://tonicdev.com/569fd5d4a6f5cc0d0018195d/569fd5d4ff73f00e00779a00

@spencermountain
Copy link
Owner

ah, rats. k thanks.
i'll take a look
thought: should it be renamed to 't.toAmerican(), t.toBritish()'?
or something else?

@nathanmarks
Copy link
Contributor

@spencermountain xxxxxxxx-ize seems to be the norm for a lot of functions in "inflection" libs (dasherize, humanize, camelize, parameterize). FWIW Americanization is a thing which is a nice touch.

@spencermountain
Copy link
Owner

;) copy that.

@spencermountain spencermountain changed the title Britishize doesn't work Britishize asymmetry with Americanize Jul 5, 2016
@spencermountain
Copy link
Owner

locale was removed from this repo a couple months ago, so will close this ticket.
hope to get back into it though, one day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants