Comments (19)
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.
Yeah, sure
from phpsyllable.
How do I get write permission?
from phpsyllable.
Just submit a pull request from your forked repository through Github.
from phpsyllable.
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.
I also added a testSplitWords() function in SyllableTest.php
from phpsyllable.
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.
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.
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.
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.
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.
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.
Is this the same as an SSH key or deploy key?
from phpsyllable.
Yes, the SSH key
from phpsyllable.
I've created a pull request now 😄
from phpsyllable.
$syllables = explode('-', $string);
That doesn't take into account word boundaries or hyphens already in the text.
from phpsyllable.
PR #30 is probably related to related to this issue. The PR had been approved but not merged: is there anything missing?
from phpsyllable.
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.
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)
- Not working with : abeyant , abraxas , abraxas , pipeline etc HOT 4
- Error when trying to use the functions HOT 2
- hyphenateHtml messes up certain symbols HOT 1
- Showing the stress on syllables HOT 3
- no autoloader for PHP 7+ HOT 1
- Min word count after hyphenation
- Array and string offset access syntax with curly braces is deprecated HOT 2
- Results differ from syllable.toyls.com HOT 1
- Word does not syllablise correctly HOT 1
- Update language files HOT 4
- Replace / remove outdated German language file hyph-de.tex HOT 5
- Replace test execution by Travis CI with GitHub Action HOT 2
- Allow auto merge for this repository HOT 1
- Request for feedback; deprecated splitWord HOT 3
- Post-processing of first run of language update and tests workflow
- Need absolute path to cache language files HOT 24
- Cache version in JSON cache file can be infinite decimal HOT 1
- lowercase vs uppercase hyphenation word list HOT 2
- Cleanup HOT 2
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 phpsyllable.