Serg-Norseman / GEDKeeper

GEDKeeper - program for work with personal genealogical database
https://gedkeeper.net/
GNU General Public License v3.0
149 stars 44 forks source link

Suggestion: Frequency of names report: Consider surnames in male and female forms as same #552

Closed burtek closed 1 month ago

burtek commented 2 months ago

There is a rule in polish language that if the surname ends with -cki/-ski/-dzki, it changes into -cka/-ska/-dzka for females. Not sure if any other language has something like this, but I guess it would be nice to be able to specify such rules for the report generator.

My idea is a list of "surname replacements" for the report generation. In this case, before the report generation (in app settings?), I could provide following replacements (using regex):

Report generator would then apply those replacements for each surname as they are counted and instead count based on the replacement output.


NB: I know the frequency of names report is on bottom of the importance list of GEDKeeper modules, so I don't really expect it to be implemented, but I figured I might as well open this issue anyway and just suggest it

cbettinger commented 2 months ago

Be aware, that the list of replacements you suggested, is not complete. For example the wife of "Konieczny" is "Konieczna".

burtek commented 2 months ago

I'm aware of that. That's why I suggested this to be configurable in the app settings. There are too many possibilities here to make it a static, not configurable feature.

Serg-Norseman commented 2 months ago

Such functionality exists for the Russian language. But it is implemented as part of the culture class code (the NormalizeSurname function). Nothing prevents us from creating an analogue for the Polish language.

https://github.com/Serg-Norseman/GEDKeeper/blob/master/projects/GKCore/GKCore/Cultures/PolishCulture.cs https://github.com/Serg-Norseman/GEDKeeper/blob/master/projects/GKCore/GKCore/Cultures/RussianCulture.cs

burtek commented 2 months ago

That works, too. I can and come up with a PR based on the russian code.

Does that mean though, the behaviour will depend on the language set by the user?

Serg-Norseman commented 2 months ago

Yes

burtek commented 2 months ago

So that means it won't work for me if I'm using English language... :/

Serg-Norseman commented 2 months ago

Cultures are tied not to the interface language, but to the language of the database (File\Properties) or to the language of each individual person name.

burtek commented 2 months ago

Oh, gotcha. Makes more sense. Thanks.

Serg-Norseman commented 1 month ago

You improved localization into Polish and did this PR. According to my principles, I must mention you in the history of the project. Tell me, please, in what form do you prefer: nick (burtek), first name (Bartosz) or will you provide the full name?

burtek commented 1 month ago

either works :) I usually default to my username when coding, so let's go with that

Thanks!

Serg-Norseman commented 1 month ago

Ok :)