Skip to content
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

More adjective rules #387

Merged
merged 2 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions commonItems.UnitTests/Linguistics/StringExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ public class StringExtensionsTests {
[InlineData("Arecibo", "Areciboan")]
[InlineData("Shahrisabz", "Shahrisabzian")]
[InlineData("El Paso", "El Pasoan")]
[InlineData("Kerch", "Kerchian")]
[InlineData("Konotop", "Konotopian")]
[InlineData("Iskilip", "Iskilipian")]
[InlineData("Peruwelz", "Peruwelzian")]
[InlineData("Schmargendorf", "Schmargendorfer")]
[InlineData("Schwelm", "Schwelmer")]

// adjectives relying on rewrite rules
[InlineData("Armenia Maioris", "Greater Armenian")]
Expand Down Expand Up @@ -508,8 +514,12 @@ public void AdjectiveRuleExistsForEveryCountryAndMajorCityInTheWorld() {
var cities = CsvReader.ReadFromText(csv)
.Select(line => line[0])
.Where(city => !string.IsNullOrEmpty(city))
.Where(city => !city.Contains(" in der "))
.Where(city => !city.Contains(" an der "))
.Where(city => !city.Contains(" am "))
.Where(city => !city.StartsWith("Zürich (Kreis"))
.Where(city => !city.StartsWith("Sector "))
.Where(city => !city.EndsWith(" II"))
.Distinct()
.ToList();

Expand Down
14 changes: 13 additions & 1 deletion commonItems/Linguistics/adjective_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@
{"*ego", "*egan"}, // San Diego
{"*egu", "*egu"}, // Daegu
{"*eia", "*ian"}, // Eleia
{"*elm", "*elmer"}, // Schwelm
{"*ene", "*enian"}, // Cyrene
{"*eno", "*enoite"}, // Reno
{"*eru", "*eruvian"}, // Peru
Expand Down Expand Up @@ -471,6 +472,7 @@
{"*omo", "*omo"},
{"*oof", "*oofian"}, // Duiwelskloof, rule made up
{"*oon", "*oonian"}, // Cameroon
{"*orf", "*orfer"}, // Schmargendorf
{"*osu", "*osuite"}, // Yeosu
{"*pan", "*panese"}, // Japan
{"*peg", "*pegger"}, // Winnipeg
Expand Down Expand Up @@ -565,6 +567,7 @@
{"*bz", "*bzian"}, // Shahrisabz
{"*ca", "*can"}, // Africa
{"*ce", "*cian"}, // Thrace
{"*ch", "*chian"}, // Kerch
{"*co", "*can"}, // Morocco
{"*de", "*dean"}, // Cape Verde
{"*do", "*dense"}, // https://en.wikipedia.org/wiki/Ejido,_Venezuela
Expand All @@ -577,6 +580,7 @@
{"*en", "*enese"}, // Jan Mayen
{"*én", "*enés"}, // Jaén
{"*eo", "*ean"}, // Bengeo
{"*ep", "*epian"}, // Pochep
{"*er", "*erite"}, // Casper
{"*es", "*ian"}, // Maldives,
{"*ew", "*ewense"}, // Trelew
Expand All @@ -589,6 +593,7 @@
{"*in", "*inese"}, // Benin
{"*im", "*imite"},
{"*io", "*ian"}, // San Antonio
{"*ip", "*ipian"}, // Iskilip
{"*is", "*ian"}, // Locris
{"*it", "*iti"}, // Kuwait
{"*ix", "*ician"}, // Phoenix
Expand All @@ -605,11 +610,16 @@
{"*ku", "*kuvian"}, // Baku
{"*ld", "*ldian"}, // Chesterfield
{"*ll", "*llese"}, // Marshall
{"*lm", "*lmite"}, // Stockholm
{"*ln", "*lnite"}, // https://en.wikipedia.org/wiki/Lincoln,_Nebraska
{"*lo", "*lonian"}, // Buffalo
{"*lp", "*lpian"}, // Kulp (rule made up)
{"*lz", "*lzian"}, // Peruwelz
{"*lu", "*lan"}, // Honolulu
{"*me", "*man"}, // Rome
{"*mi", "*mian"}, // Symi
{"*mo", "*moan"}, // Alamo
{"*mp", "*mpian"}, // Oostkamp
{"*my", "*mois"}, // Saint Barthélemy
{"*na", "*nian"}, // Argentina
{"*nj", "*nji"},
Expand All @@ -620,8 +630,9 @@
{"*oh", "*ohan"},
{"*om", "*omian"},
{"*on", "*onese"}, // Gabon
{"*oy", "*ojan"}, // Troy
{"*op", "*opian"}, // Konotop
{"*os", "*ian"}, // Thasos
{"*oy", "*ojan"}, // Troy
{"*ów", "*ovian"}, // Kraków
{"*pa", "*pan"}, // Tampa
{"*pe", "*pean"}, // Europe
Expand Down Expand Up @@ -654,6 +665,7 @@
{"*yn", "*ynite"}, // Brooklyn
{"*ys", "*ysian"}, // Arambys (rule made up)
{"*ze", "*zean"}, // Belize
{"*zh", "*zhian"}, // Novovoronezh (rule made up)
{"*[v]h", "*[v]hite"},
{"*[v]k", "*[v]kian"},
{"*[c]s", "*[c]ian"}, // Athens
Expand Down
2 changes: 1 addition & 1 deletion commonItems/commonItems.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageId>PGCG.$(AssemblyName)</PackageId>
<Version>10.0.2</Version>
<Version>10.0.3</Version>
<Authors>PGCG</Authors>
<PackageProjectUrl>https://github.com/ParadoxGameConverters/commonItems.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/ParadoxGameConverters/commonItems.NET</RepositoryUrl>
Expand Down
Loading