Code Monkey home page Code Monkey logo

abbreviate's People

Contributors

amoghrajesh avatar andrysds avatar billcobbler avatar dnnrly avatar dubek avatar leafoliage avatar milesmcc avatar riyajohn avatar scottyeck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

abbreviate's Issues

Hi sir

What word do you think needs abbreviating?

Go on, what's too long?

What should it be abbreviated to?

What's better?

New abbreviations

Is your feature request related to a problem? Please describe.
The current list of abbreviations is OK but l feel a little lacking.

Describe the solution you'd like

  • More abbreviations
  • Abbreviations in other languages

Remove functional words using a list of stopwords

Is your feature request related to a problem? Please describe.
The English language has a lot of short connector words which have a grammatical function but don't necessarily provide meaning. Thus they can be omitted when creating abbreviations.

Describe the solution you'd like
A simple solution would be to save a list of stopwords and to have a flag that the user could use to remove them.

Here is an example:
$ abbreviate snake "The strategy of limited science" --stopwords tstg_ltd_sci

versus the current behavior (so without the flag):
$ abbreviate snake "The strategy of limited science" --stopwords the_stg_of_ltd_sci

Additional context
Initially we could curate our own list of stopwords. Eventually we could use this as a possible source:
https://github.com/bbalet/stopwords

Setting up a workflow for every pull request

Is your feature request related to a problem? Please describe.
Creating a pull request does not check whether the change has broken current working test cases. Although it is encouraged to run all the tests before someone submits a PR but being double sure is good.

Describe the solution you'd like
Add a github workflow that will trigger all the tests to run when someone raises a PR.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Upgrade CI actions

Is your feature request related to a problem? Please describe.
At the moment, the PR build action doesn't provide all of the features that I would expect. It would be nice if this repo could follow some of the later best practices.

Describe the solution you'd like

Perhaps using wait-for as an example, update the PR workflow action to include (and not limited to):

  • Coverage metrics
  • Release build validation
  • Enabled for external contributors

Add abbreviations for title case

What word do you think needs abbreviating?

We should add support for abbreviating using title casing.
Title Case:

  • Title case capitalizes the first letter of each word in a string, typically used for formatting titles, headings, or sentences and seperates it with space
    Example: The Quick Brown Fox

What should it be abbreviated to?

Usage example:

$ abbreviate title prestrategy-limitedment
Prstg Ltdmnt

What's better?
NA

Add kebab (dash) case command

Is your feature request related to a problem? Please describe.
At the moment camel, pascal and snake cases are available. Kebab case is another popular ways to combine strings and abbreviate doesn't provide this option.

Describe the solution you'd like
It would be nice to have also the kebab command available that can be used to abbreviate a string and convert it to kebab case.

Example

$ abbreviate kebab StrategyLimited
stg-ltd

Handle common prefixes/suffixes (when predefined word does not exist)

Is your feature request related to a problem? Please describe.
Related to #13

Describe the solution you'd like
Add list of common prefixes and suffixes and their abbreviations (e.g. -ible -> bl)
When predefined word does not exist, attempt to remove common prefix or suffix (e.g. in-access-ible -> access-ible)
Look up remaining word again
Repeat prefix/suffix removal as many times as necessary (e.g. access-ible -> access)
Concatenate prefix abbreviation, word abbreviation, and suffix abbreviation (e.g. in-access-ible -> in-acc-bl)

cc @FungusHumungus

Migrate to GoDog acceptance tests

Is your feature request related to a problem? Please describe.

At the moment, we have to include non-go dependencies to run acceptance tests. This is bash based and tricky to get right. We could achieve just as much with godog, without having to switch to another language. And go has more testing features/libraries available.

Describe the solution you'd like
BATS acceptance tests replaced with Godog ones.

Attempt to guess an abbreviation when a predefined one doesn't exist

Is your feature request related to a problem? Please describe.
At the moment, there is a defined list of abbreviations that are looked up. Where an abbreviation isn't present, it just won't be abbreviated.

Describe the solution you'd like
It would be good if the tool could attempt to shorten words taht it doesn't already know about.

A couple of different strategies we could explore:

  • Match only parts of words
  • Remove all vowels

Additional context
How would this work with other languages?

Shorten from the front

Is your feature request related to a problem? Please describe.
At the moment, the algorithm used starts from the last 'word' in the string and works backwards. This makes an assumption about how the string should be shortened that may not work for everyone.
A good option might be to shorten from the front instead.

Describe the solution you'd like

$ abbreviate --length 15 strategy-limited
strategy-ltd
$ abbreviate --from-front --length 15 strategy-limited
stg-limited

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.