Giter Site home page Giter Site logo

dotnaught / spellerizer Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 1.0 54 KB

An extension for Google Chrome that allows you to replace words with US spellings in The Register articles with UK spellings.

License: GNU General Public License v2.0

JavaScript 43.32% HTML 25.97% CSS 30.70%

spellerizer's People

Contributors

dotnaught avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gwilio

spellerizer's Issues

Switch to regex-based matching to allow for context matches

As stated in your article, currently you just replace "check" with "cheque" because you are only operating on individual words.
If you replaced the check match with ((a|the)\s)?check then you would match "a check" or "the check", and you would just have to replace it with '\1cheque(although you might want to replace the central section manually to case match it). You could also add acheck( please)` match.
You could alternatively specify it in the JSON as a context prefix/suffix where you would specify it as a regex (and when building the actual regex, add the case insensitive flag and probably lookahead/look behind so the context matched could also be replaced if needed.

I am using check as an example, I'm sure that there are other words that would benefit from context matching.

Edit: I have just read your article further, and noticed that the spelling_data.json file was not written by you and this would require changes to that file / format

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.