EducationalTestingService / EducationalTestingService/match

Incorrect results when the original text contains aribitrary whitespace throughout

Offen
#7 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @dmnapolitano Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
20
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

([Source](https://www.poetryfoundation.org/poems/47247/in-just))

```python
original_text = """in Just-\nspring when the world is mud-\nluscious the little\nlame balloonman\n\nwhistles far and wee\n\nand eddieandbill come\n
running from marbles and\npiracies and it's\nspring\n\nwhen the world is puddle-wonderful\n\nthe queer\nold balloonman whistles\nfar and wee\nand bettyandisbel\
come dancing\n\nfrom hop-scotch and jump-rope and\n\nit's\nspring\nand\n\n the\n\n goat-footed\n\nballoonMan whistles\nfar\nand\nwee"""
```

```python
match.match(original_text, ["when", "the", "world", "is", "mud-luscious",
"the", "little", "lame", "balloonman", "whistles", "far", "and", "wee"])
```

This produces incorrect results, failing to match all the way to the end of `"wee"` (let alone `"whistles"`):

```python
[(25, 92, 'when the world is mud-\nluscious the little\nlame balloonman\n\nwhistle')]
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.