Coder Social home page Coder Social logo

Comments (9)

DanielBaird avatar DanielBaird commented on May 12, 2024 1

Shot in the dark: maybe try britishise() ?

from compromise.

AbhinavMadahar avatar AbhinavMadahar commented on May 12, 2024

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

from compromise.

spencermountain avatar spencermountain commented on May 12, 2024

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

from compromise.

spencermountain avatar spencermountain commented on May 12, 2024

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.

from compromise.

nathanmarks avatar nathanmarks commented on May 12, 2024

@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

from compromise.

spencermountain avatar spencermountain commented on May 12, 2024

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

from compromise.

nathanmarks avatar nathanmarks commented on May 12, 2024

@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.

from compromise.

spencermountain avatar spencermountain commented on May 12, 2024

;) copy that.

from compromise.

spencermountain avatar spencermountain commented on May 12, 2024

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

from compromise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.