Results 1 to 5 of 5

Thread: Plurals

  1. #1
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,025

    Default Plurals

    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&frac12;&aelig;: 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&trade; 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.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  2. #2
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,741

    Default

    FYI regarding Unix/Windows/Mac linebreaks - Gammon made some command line utilities years ago to easily convert.
    https://www.gammon.com.au/downloads/dlutilities.htm

  3. #3

    Default

    FYI regarding Unix/Windows/Mac linebreaks - Gammon made some command line utilities years ago to easily convert.
    https://www.gammon.com.au/downloads/dlutilities.htm
    Originally Posted by Theraze View Post
    Interesting, but plurals tend to not have line breaks in them.

  4. #4
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,025

    Default

    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.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post

  5. #5

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •