Giter Club home page Giter Club logo

Comments (19)

vanderlee avatar vanderlee commented on June 12, 2024 1

Good idea, but currently not available.

It should be quite possible to add a splitWords(string $text) method that outputs an array of split words. Punctuation, numbers, spacing and other non-words would (optionally) have to appear in their own root elements, but that shouldn't be much of a problem.

If you'd like to contribute such a method, it would be highly appreciated. Otherwise it might take a while for me to get to it, as I'm currently focussing on different projects.

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

Yeah, sure

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

How do I get write permission?

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

Just submit a pull request from your forked repository through Github.

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

I've made a function that works without symbols now, but I would probably need some help to make it work with symbols

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

I also added a testSplitWords() function in SyllableTest.php

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

When I try to push the changes to my fork, it says that I don't have permission to do that:

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

Thanks for the effort! The error is probably either a wrong repository name (you have to push to your own fork, not this main repository) or you have not set your public key (I'm assuming this is not the case, considering what you wrote earlier).

Please let me know if this is getting too much work for you, and we could just copy+paste the code but if you want to contribute to other github projects in the future, the process will be the same.

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

I haven't worked that much with Git, so I would like to learn how the process works 😄
I just have to understand the process: So I start by pushing the changes to my own fork and then create a pull request to your repository?
Ps: I haven't created a public key, could that be the case?

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

Exactly right! With Git, you basically only work directly with your own repository and create pull requests. Github manages the pull requests (PR's) and makes it easy to work this way.

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

So the only problem is that I don't have permission to push to my own fork. Does this have anything to do with the public key that I haven't set?

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

Very likely. You'll need to set up a private/public key pair, install the private key locally and upload the public key pair to github.

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

Is this the same as an SSH key or deploy key?

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

Yes, the SSH key

from phpsyllable.

Vicedivic avatar Vicedivic commented on June 12, 2024

I've created a pull request now 😄

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

$syllables = explode('-', $string);

That doesn't take into account word boundaries or hyphens already in the text.

from phpsyllable.

alexander-nitsche avatar alexander-nitsche commented on June 12, 2024

PR #30 is probably related to related to this issue. The PR had been approved but not merged: is there anything missing?

from phpsyllable.

vanderlee avatar vanderlee commented on June 12, 2024

PR #30 has some merge conflicts. I'm pretty short on time at the moment but will try to take a look at it next week.

from phpsyllable.

alexander-nitsche avatar alexander-nitsche commented on June 12, 2024

Hi @Vicedivic ,

to understand your use case in general and specifically: What do you expect should be returned by splitWords(string $text) for the text "Redundant, punctuation..."? This:

[
  ['Re', 'dun', 'dant'],
  [', '],
  ['punc', 'tu', 'a', 'tion'],
  ['...'],
],

?

How should punctuations be handled?

Greetings
Alex

from phpsyllable.

Related Issues (20)

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.