Comments (6)
And of course with a levelspec: LexicalMap[f, expr, lp, pos]
from lexicalcases.
Wait, level spec doesn't make any sense, expr is a string..
from lexicalcases.
Simple enough to implement.
from lexicalcases.
This already works with StringReplace, though I like the design of Map.
LexicalMap[ToUpperCase, "This is cool", TextType["Adjective"|"Verb"]]
vs
StringReplace["This is cool", LexicalPattern[match:TextType["Adjective"|"Verb"] :> ToUpperCase[match]]]
from lexicalcases.
I've implemented it, but some longstanding behavior has reared its head. Note what gets replaced around "is cool" the spacing is inconsistent. an adjective text type should match just the text type and the spaces, but only bind to the word.
from lexicalcases.
Maybe setting the MatchTrim option in the StringReplace UpValue?
from lexicalcases.
Related Issues (20)
- [LLM][Experiment] Tokenization model using lexical patterns
- WordToken distribution spec
- LexicalMap broken example
- LexicalDispersionPlot should use Tooltip for tick marks when the dataset is large
- Investigate LexicalDispersionSmoothHistogram of LexicalSummary HOT 1
- Remove Sandwich from Symbol registry
- Add Formatting of LexicalPattern for aesthetic labeling HOT 2
- TextType could be TypeToken
- Vector DB Build
- Use FormatLexicalPattern for plot labels
- Broken link to LexicalDispersionPlot from LexicalDispersionSmoothHistorgram SeeAlso
- Old ref pages still exist on paclet page HOT 1
- ToLexicalPattern trimmed whitespace when preserving tokens HOT 2
- Strange match span HOT 2
- May need to invert theme in plots
- LexigramCount counts each element of alternatives HOT 1
- Add automatic label support for plots
- [Asys] looking at synonyms across a text HOT 1
- Improve phrasing for LexicalSummary property description
- Support common NLP statistics
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 lexicalcases.