inflector icon indicating copy to clipboard operation
inflector copied to clipboard

dutch language

Open noud opened this issue 5 years ago • 32 comments

hi, can we have this? it is the basic of Dutch language inflector. thanks, Noud

noud avatar Sep 06 '20 11:09 noud

oyg, it has "Review required" that i am not used to ....

noud avatar Sep 06 '20 11:09 noud

ow and Dutch is very irregular so more additions will follow.

noud avatar Sep 06 '20 15:09 noud

oyg, it has "Review required" that i am not used to ....

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.

greg0ire avatar Sep 06 '20 15:09 greg0ire

You can run vendor/bin/phpcbf, it will take care of most issues.

greg0ire avatar Sep 06 '20 15:09 greg0ire

all checks passed and i have now that phpcbf running local as well. thanks.

noud avatar Sep 06 '20 15:09 noud

ok will do was already scared about tests ....

noud avatar Sep 06 '20 15:09 noud

okay,

so i partly solved a problem given i have this during actual use:

$ php artisan api-platform:generate "Adres" "Afbeelding" "Link" "Locatie" "Politiebureau" "PolitiebureausLocatie" "Translation" "Twitter" "Wijkagent" "WijkagentenLinks" "WijkagentenLocatie" "WijkagentenTranslations"

(this is from https://github.com/noud/politie-open-data-api)

see the correct "Adres" there and the failing one in test.

Noud

noud avatar Sep 06 '20 16:09 noud

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?

  1. git rebase -i origin/master, assuming origin is a git remote that points to this repository, and not your fork. If you're not sure what your remotes are, run git remote -vvv, there should be your fork and the holy/reference/base/origin/whatever-you-call-it repository.
  2. A window will show up with many lines, replace pick with fixup on every line but the first one
  3. Close your editor, git should do its magic, and you should end up with one commit
  4. Use git push --force to overwrite what you already push. Don't forget the --force option otherwise git will try to merge both things together.

greg0ire avatar Sep 06 '20 18:09 greg0ire

oyg, i will squash my commits but not immediate .... and if i manage to do that squashing ....

noud avatar Sep 06 '20 18:09 noud

i managed to squash.

noud avatar Sep 07 '20 14:09 noud

Users don't need to know for how long we supported a language in this lib, do they?

correct

noud avatar Oct 28 '20 18:10 noud

no tweet

noud avatar Oct 28 '20 18:10 noud

might w/ merge

noud avatar Oct 28 '20 18:10 noud

may i ask the #nl at #doctrine cc #100DaysOfCode on twitter to add, to the Dutch in doctrine/inflector ??

You may tweet asking people for reviews if this is what you meant by that

greg0ire avatar Oct 28 '20 18:10 greg0ire

hello @greg0ire and @alcaeus

this pull request "add Dutch language in inflector" is accepted, closed and not integrated in the code base?

While @greg0ire told me it is okay now after squashing. Now @alcaeus removes the pull request all togheter 13 hours ago?

So what else do i or we have to do to get Dutch language in the inflector? Help please.

Screenshot from 2020-12-01 09-03-32

noud avatar Dec 01 '20 08:12 noud

https://twitter.com/greg0ire/status/1333688952755195907

greg0ire avatar Dec 01 '20 08:12 greg0ire

@greg0ire question:

PHP CodeSniffer Config installed_paths set to ../../slevomat/coding-standard,../../doctrine/coding-standard/lib Error: The operation was canceled.

and

Generating code coverage report in Clover XML format ... done [00:00.009] Error: Process completed with exit code 1.

???

this previous worked say half an hour back. is your doing?

noud avatar Dec 01 '20 22:12 noud

Hello.

One more set to test for: ['kies', 'kiezen'],.

I'll check if there are more things to add tomorrow, if that's okay.

Thank you for your work on this!

TimoBakx avatar Dec 01 '20 22:12 TimoBakx

I'll check if there are more things to add tomorrow, if that's okay.

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.

noud avatar Dec 01 '20 22:12 noud

@greg0ire question, remark:

now we also have this: PHP Fatal error: Uncaught Error: Class 'Doctrine\Tests\Inflector\Rules\LanguageFunctionalTest' not found in /home/noud/workspaces/laravel-workspace/inflector/tests/Doctrine/Tests/Inflector/Rules/English/EnglishFunctionalTest.php:14

??

noud avatar Dec 01 '20 23:12 noud

I don't have that error locally on 7f6a1b435cdcd14cf1e24dabfb2951c69e04be2c, nor does the CI…

greg0ire avatar Dec 02 '20 06:12 greg0ire

I don't have that error locally on 7f6a1b435cdcd14cf1e24dabfb2951c69e04be2c, nor does the CI…

@greg0ire can this be related to:

PHP CodeSniffer Config installed_paths set to ../../slevomat/coding-standard,../../doctrine/coding-standard/lib Error: The operation was canceled.

and

Generating code coverage report in Clover XML format ... done [00:00.009] Error: Process completed with exit code 1.

???

this previous worked say half an hour back. is your doing?

i'll look at 7f6a1b435cdcd14cf1e24dabfb2951c69e04be2c as well ....

noud avatar Dec 02 '20 07:12 noud

Yes maybe, try composer install?

greg0ire avatar Dec 02 '20 07:12 greg0ire

Yes maybe, try composer install?

the github web checks we are talking about.

i just did rm -r vendor && composer install nothing changed so nothing to commit.

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.

noud avatar Dec 02 '20 07:12 noud

@SenseException

I can't tell anything about the language, but under this premise we should still proceed with this PR even if we can't find someone who can review the parts of the dutch language.

Please also check the failing coding style build.

maybe my previous reply got lost, error on me. this reply: i'd like to keep the comments in as pointers for further work. is okay?

noud avatar Dec 02 '20 10:12 noud

i'd like to keep the comments in as pointers for further work. is okay?

Given the large number of comments, it seems that there will be a significant amount of work to finish this, right?

Maybe this sounds a bit lame and half work done?

Not going to lie, it does :grimacing: 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?

i did read somewhere someone in the known to doctrine gave up on German his own language

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?

greg0ire avatar Dec 04 '20 19:12 greg0ire

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.

TimoBakx avatar Dec 04 '20 19:12 TimoBakx

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?

support. For one i think most dutch projects are done in English. Second i welcome any issues to pick them up. (mind is as we all know free and spare time work) And, as i experience myself, i have over 50% good results and for sure in dev environment are already a little happy w/ that. (furthermore i think if anyone keeps the stanza it should be 90% i guess it will never be done we will near never see just one or two PRs on such somewhat complex languages)

I did the same inflections (a bit more) some years ago fot CakePHP and i did read remarks commercial company we are inspired by that cake work (them copy pasted in full) so there the least is a commercial web build company that is (somewhat) happy w/ it.

Now if we have a uni level linguistic organization around that is well known to Dutch it would not be a problem.

i did read somewhere someone in the known to doctrine gave up on German his own language

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?

It was not rejected, Did not come so far the person coding gave up. i think this is what i did read (mind German is even worse then Dutch) https://github.com/doctrine/inflector/issues/99 "dereuromark commented on Sep 28, 2018": "I once tried as well, and after 500 lines of exceptions and still no where close to having a reliable package " (my idea is Dutch is a bit simpler)

noud avatar Dec 04 '20 20:12 noud

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.

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)

noud avatar Dec 04 '20 20:12 noud

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:

@SenseException commented on this pull request.


In tests/Doctrine/Tests/Inflector/Rules/Dutch/DutchFunctionalTest.php https://github.com/doctrine/inflector/pull/173#discussion_r536376662:

  •        // ['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 https://github.com/doctrine/inflector/pull/173#discussion_r536376662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFS7OAWSZQ7OIZEXGJSTTSTFEXNANCNFSM4Q4JBMMA.

noud avatar Dec 04 '20 21:12 noud