Comments (9)
Shot in the dark: maybe try britishise()
?
from compromise.
Also, it when converting from British to American, it will make "are" to "aer" using the logic that "metre" becomes "meter"
from compromise.
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.
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.
@spencermountain Here's a demo with a few terms not working as hoped:
- britishization not working
- britishization not working
- americanization works
- americanization incorrect
https://tonicdev.com/569fd5d4a6f5cc0d0018195d/569fd5d4ff73f00e00779a00
from compromise.
ah, rats. k thanks.
i'll take a look
thought: should it be renamed to 't.toAmerican(), t.toBritish()'?
or something else?
from compromise.
@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.
;) copy that.
from compromise.
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)
- [Improvement]: Bank of #Place - Rule. HOT 1
- [Improvement]: Government of #Country - Rule HOT 2
- [Improvement]: School Board - Rule HOT 4
- [Improvement]: Better compression algorithm HOT 3
- [Improvement]: Museum - Rule
- [Improvement]: Location Disambiguation \ Human Name Matching - Rule HOT 4
- [Improvement]: Corporation Rule HOT 7
- Unexpected behavior if "no space after period" HOT 3
- compromise-dates: types unavailable HOT 1
- Possible Issue with Root Matching HOT 1
- Uncaught TypeError: Cannot read properties of undefined (reading 'map') HOT 3
- Matched sentence text duplicated if match value occurs more than once in string HOT 2
- Property 'normalize' does not exist on type 'People'. HOT 4
- Feature Request: Proper Tagging of Names with Possessive Apostrophes HOT 6
- [Bug]: Syntax / Matching Parsing Issue. HOT 10
- Punctuation following abbreviations causes sentences to merge HOT 3
- `.not()` is destructive to punctuation HOT 4
- Feature Request: Add data to a term HOT 3
- Add TypeScript Support for Compromise-Dates HOT 2
- Website misspelling of "definitely" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compromise.