-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dutch language #173
base: 2.1.x
Are you sure you want to change the base?
dutch language #173
Conversation
oyg, it has "Review required" that i am not used to .... |
ow and Dutch is very irregular so more additions will follow. |
It needs we in the team need to review the PR. I will do so when you manage to make the test suite pass. I just contributed #174 , that will help you figure out what is left to do on your next push or if you close and reopen this PR. |
You can run |
all checks passed and i have now that phpcbf running local as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov is right, please add some tests. There are examples in tests/Doctrine/Tests/Inflector/Rules/{English,French}
ok will do was already scared about tests .... |
okay, so i partly solved a problem $ php artisan api-platform:generate (this is from https://github.com/noud/politie-open-data-api) see the correct "Adres" there Noud |
tests/Doctrine/Tests/Inflector/Rules/Dutch/DutchFunctionalTest.php
Outdated
Show resolved
Hide resolved
*/ | ||
public static function getPlural() : iterable | ||
{ | ||
// allready in plural |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's spelt "already", and I don't understand what this comment is about…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected.
and i also have a non-understanding w/ the comment.
originally it came from github.com/noud/cakephp-dutch/blob/master/Config/inflections.php
also used in github.com/enflow/component-inflector/blob/master/src/Language/Dutch.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove it then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may it be let in, as a remider?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a reminder of what? We have no idea what it means…
Please kindly squash your commits together. If you don't, we'll try to remember to do it for you but it's best if you save us this trouble. How to do that?
|
oyg, i will squash my commits but not immediate .... and if i manage to do that squashing .... |
i managed to squash. |
a4cf50b
to
eea1cb9
Compare
correct |
no tweet |
might w/ merge |
tests/Doctrine/Tests/Inflector/Rules/Dutch/DutchFunctionalTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/Inflector/Rules/Dutch/DutchFunctionalTest.php
Outdated
Show resolved
Hide resolved
public function dataSampleWords(): array | ||
{ | ||
return [ | ||
['schip', 'schepen'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need some extra tests here.
['schip', 'schepen'], | |
['schip', 'schepen'], | |
['idee', 'ideeën'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi you 2,
did swap my incorrectness and did add note for possible rule.
tests running again now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! 👋
Please also add:
['meer', 'meren'],
['baas', 'bazen'],
['oog', 'ogen'],
['as', 'assen'],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added but outcommented for now.
@greg0ire question: PHP CodeSniffer Config installed_paths set to ../../slevomat/coding-standard,../../doctrine/coding-standard/lib and Generating code coverage report in Clover XML format ... done [00:00.009] ??? this previous worked say half an hour back. |
|
||
yield new Substitution(new Word('idee'), new Word('ideeën')); | ||
|
||
// @todo: above 3 examples maybe could be compacted into a rule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indeed needs to be a rule instead of specific exceptions for these words, for example wee
, zee
, twee
, drie
, theorie
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now i see 2 rules:
- wee, zee, twee
- drie, theorie
but did not make it into rules yet, given i do not know yet if that does conflict other words.
// http://nl.wikipedia.org/wiki/Meervoud_(Nederlands)#Klinkerverandering | ||
yield new Substitution(new Word('lid'), new Word('leden')); | ||
|
||
yield new Substitution(new Word('smid'), new Word('smeden')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the word above should be a rule. Also includes words like ooglid
(and other samples of ~lid
)
Hello. One more set to test for: I'll check if there are more things to add tomorrow, if that's okay. Thank you for your work on this! |
and i maybe have to make 1 or 3 rules extra now tomorrow. now: tomorrow is today and skips to the day after today, pardon me. |
@greg0ire question, remark: now we also have this: ?? |
I don't have that error locally on |
@greg0ire can this be related to: PHP CodeSniffer Config installed_paths set to ../../slevomat/coding-standard,../../doctrine/coding-standard/lib and Generating code coverage report in Clover XML format ... done [00:00.009] ??? this previous worked say half an hour back. i'll look at 7f6a1b4 as well .... |
Yes maybe, try |
the github web checks we are talking about. i just did rm -r vendor && composer install i will add one bogus char or line now and we see.... okay, runs as expected now failing over some later added words to test. |
maybe my previous reply got lost, error on me. |
Given the large number of comments, it seems that there will be a significant amount of work to finish this, right?
Not going to lie, it does 😬 Why should people use this in production if it only has a 50/50 chance of doing the job properly? Won't this generate a lot of support?
Can you find this again? I think it wouldn't make sense to accept a PR on Dutch if German was rejected in a similar case, would it? |
There is a lot of work still ahead. I think it would be best to implement more rules before merging this. I would love to help out if you want. I have little knowledge of the syntax for the rules, perhaps we could work on this together and improve it for at least most of the rules and hopefully quite a few exceptions. As it is right now, with some rules for quite common words missing, I don't think it's a good idea to accept/merge this. |
support. I did the same inflections (a bit more) some years ago fot CakePHP and i did read remarks commercial company Now if we have a uni level linguistic organization around that is well known to Dutch it would not be a problem.
It was not rejected, Did not come so far the person coding gave up. |
O i welcome this Timo, at first i did think yeah you give tests but do not think rules but you do well seem to have the interest, good and nice. So yes help and working together for sure appreciated and accepted. Furthermore i noticed your name might tell about you having a dutch connection like me as well? (mind it is spare and free time work for me) We have to find and understand the linguistic rules. Maybe see what linguistic organizations are able to help us, think organizations that do dutch text to speech, it is a bit in there lane of work.Some years ago Symfony had a web inflector, see where that thing went, use it as low level step-in for non coding people, maybe also have some web interface to the rule sets and exceptions, so non coding people can have give there input as well. (just a few thoughts) |
latest comments, yes i think Timo brought some words to the table to test,
but and also one maybe 2 extra rules. I hope to formulate them so code them
pretty soon.
50% or 70-80% i'll get us a random dutch words list and off this commit
feed them the inflector
and tell you the score.
…On 04/12/2020 22:00, Claudio Zizza wrote:
***@***.**** commented on this pull request.
------------------------------------------------------------------------
In tests/Doctrine/Tests/Inflector/Rules/Dutch/DutchFunctionalTest.php
<#173 (comment)>:
> + // ['beleg', 'beleggen'], // @todo: meening: call a meeting
+ // ['beleg', 'belegjes'], // @todo: meening: the slices food on a sandwich
Yes, "half of the work" in the same scope usually wouldn't be enough
for a merge, but it seems that the latest comments are about finishing
the other parts.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#173 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKFS7OAWSZQ7OIZEXGJSTTSTFEXNANCNFSM4Q4JBMMA>.
|
Hello @noud, apologies if me removing myself from the reviewer list caused confusion. I don't have anything to contribute to the review: the technical side is very well covered by @greg0ire and @SenseException, and without any basic knowledge in the Dutch language I am more than unqualified to review language changes. That said, I welcome the effort you and @TimoBakx are making to add support for Dutch language inflection. I had previously looked at adding support for German, but quickly gave up as many inflections depend on context which this library does not provide. Your plan to take word lists, throw them at the inflector and work to raise the score seems like a sensible approach. When it comes to context sensitive inflections, it may be worth exploring other avenues of solving this. To bring an example that previously caused breakage, take the word "weather": there are two pluralisations for this word, "weather" and "weathers", and the appropriate one depends on the context. For example, it's correct to say "we're going out in all kinds of weather" (with "weather" being plural here), but also "we've encountered many different types of weathers on our trip". It's impossible for this library to know the context, so instead of thinking how this library can guess this context we should rather allow the user to specify context and add custom inflection rules for their own contexts. So please, don't try to solve every possible use-case, especially the ones this library currently doesn't support. Instead, aim for providing a good baseline and rely on users to deal with strange edge cases themselves. |
to have better insight the dutch nouns i started |
hi,
can we have this?
it is the basic of Dutch language inflector.
thanks,
Noud