Plurals

fronobulax

Developer
Staff member
Just a FYI.

I modified checkplurals so that escape codes were replaced after scraping the wiki but before comparing to KoLmafia.

I modified the command to accept a range. checkplurals start-end will check the range of ids that satisfy start <= id < end ( or [start, end) if you prefer). Error checking on the input is not especially robust.

I have a local awk script that assists in automating the edit of items.txt from plurals.txt. Do you know what PITA is is dealing with Unix formatted EOLs with Windows tools?

The following are uncorrected.

*** Cat-Herding Prod has bogus Wiki plural: "I Am A Fish". Ignoring.
*** elven <i>limbos</i> gingerbread: KoLmafia plural = "wafers of <i>limbos</i> gingerbread", Wiki plural = "wafers of </i>limbos<i> gingerbread"
*** Annual Ascot has bogus Wiki plural: "I am a fish". Ignoring.
*** chocolate stolen accordion: KoLmafia plural = "chocolate stolen accordions", Wiki plural = "chocolate stolen accordion"
*** Vial of <i>jus de larmes</i>: KoLmafia plural = "vials of <i>jus de larmes</i>", Wiki plural = ""
*** Lobster <i>qua</i> Grill: KoLmafia plural = "pieces of Lobster <i>qua</i> Grill", Wiki plural = "pieces of Lobster </i>qua<i> Grill"
*** old school Mafi<i>a kni</i>cke½æ: KoLmafia plural = "old school Mafi<i>a kni</i>cke??s", Wiki plural = "old school Mafi</i>a kni<i>cke??s"
*** Leapin' Trousers has bogus Wiki plural: "I Am A Fish". Ignoring.
*** Solstice Shield has bogus Wiki plural: "I am a fish". Ignoring.
*** ectoplasm <i>au jus</i>: KoLmafia plural = "bottles of ectoplasm <i>au jus</i>", Wiki plural = ""
*** Special™ Sauce: KoLmafia plural = "tureens of Special? Sauce", Wiki plural = "tureens of Special%trade; Sauce"
*** ice porter: KoLmafia plural = "bottles of ice porter", Wiki plural = ""
*** question juice: KoLmafia plural = "bottles of question juice", Wiki plural = "question juice"
*** peppermint sprig: KoLmafia plural = "sprigs of peppermint", Wiki plural = "springs of peppermint"
*** Gnomish sagngria: KoLmafia plural = "glasses of gnomish sagngria", Wiki plural = "glasses of Gnomish sagngria"
*** magical pony: Pearjack: KoLmafia plural = "magical ponies named Pearjack", Wiki plural = ""
*** magical pony: Spectrum Dash: KoLmafia plural = "magical ponies named Spectrum Dash", Wiki plural = ""
*** little piece of steel: KoLmafia plural = "little pieces of steel", Wiki plural = ""

I believe the regular expression for extracting plurals from the wiki does not do so well when there is formatting, such as italics. I think everything else is a result of bad wiki data.

I am going to give this a rest now.
 

fronobulax

Developer
Staff member
I have Cygwin installed and used dos2unix and unix2dos as needed.

When I tried to edit items.txt directly some of my editors converted line endings automagically and others would insert the Windows EOL whenever I changed a line. This was not obvious until I used something that displayed whitespace. I made it worse for my self because Cygwin really likes Unix style endings. Excel made editing tab delimited easy but converted all the line endings. Mostly, though I was just venting.
 

lostcalpolydude

Developer
Staff member
Apparently I failed at rereading the initial post when trying to understand Theraze's response.

I find that Notepad++ handles line endings well enough, with replace all working well enough to handle line endings.

Mostly I just use some add-on for NetBeans that displays the line endings for the current file, and offers a quick way to switch the whole file to a different type.
 
Top