Comments (1)
TBH, I don't know. I like how Lodash makes the pattern configurable. That leaves the question, "What should the default behavior be?"
Does it make sense to split on spaces, match words but also remove punctuation chars? So.
This is a sentence, "containing a quote?"
... would return
[ 'This', 'is', 'a', 'sentence', 'containing', 'a', 'quote']
That leaves one nasty edge case, single-quotes. A word containing a single-quote could be the end of a title. Ex
sometimes single-quotes are used for titles like 'The Book of Titles'
But it is also commonly used as a conjunction
Don't remove the single-quote in don't
And other times to indicate possession
Joe's take was good but Dennis' was better
The context-specific ambiguity of Natural Language is... challenging.
Since users can define their own pattern, I'm cool with doing the same as Lodash and avoiding this complexity altogether.
from absurdum.
Related Issues (20)
- strings.pascalCase HOT 1
- strings.snakeCase HOT 1
- strings.template HOT 1
- strings.truncate HOT 2
- strings.words HOT 1
- The Chopping Block for 1.0
- Re-order README.md HOT 1
- objects.entries HOT 1
- Replace objects.include/exclude -> objects.filter? HOT 3
- Change operators with Object.entries to use Object.keys to improve cross browser compatibility HOT 1
- IE Compatibility HOT 2
- objects.filter HOT 2
- arrays.filter HOT 1
- arrays.map HOT 1
- Pre 1.0 Release Leftovers HOT 11
- Should Absurdum have a Logo? HOT 6
- Add mutability test to all methods without HOT 1
- New Entry Points HOT 1
- Security Vulnerabilities? HOT 5
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 absurdum.