Skip to content

Don't take exact strings from source text #2

@antsar

Description

@antsar

PyumIpum repeats exact phrases from the text. For example, when querying pizza, I got:

The pizza was auctioned for charity in 2007, raising GB£2,150

That's directly taken from the Wikipedia page.

Check each output sentence to make sure it isn't an exact substring match with the wiki text. If it is, PyumIpsum should ditch that sentence and generate a new one.

Here's the full/exact API response:

{ "common_words" : [ [ "pizza",
        84
      ],
      [ "Pizza",
        26
      ],
      [ "dough",
        14
      ],
      [ "Italy",
        13
      ],
      [ "oven",
        12
      ],
      [ "baked",
        11
      ],
      [ "cheese",
        11
      ],
      [ "sauce",
        10
      ],
      [ "pizzas",
        10
      ],
      [ "made",
        10
      ]
    ],
  "sentences" : [ "Since then pizza consumption has exploded in the United States with Italian immigrants in the surroundings of Naples",
      "was sold from open-air stands and out of pizza in honor of the crust",
      "The pizza was auctioned for charity in 2007, raising GB£2,150"
    ],
  "status" : "0"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions