BUG BrailleConverter output is ambiguous: "1a" encodes the same as "11", and "$" uses the period cell
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
Direzione di ricerca
The issue identifies BrailleConverter and provides a reproduction with four prompts and expected braille output. Start by locating the converter and its tests, then compare how it handles letters after numbers and the dollar sign. Done means the four outputs match the expected results; linked pull request #3533 is already open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
BrailleConverter produces the same braille for different inputs in two cases, so the encoded prompt cannot be read back unambiguously:
- A letter from a to j directly after a number is written without the letter sign (dots 56,
⠰). In braille the letters a to j share their cells with the digits 1 to 0, so1aand11both become⠼⠁⠁. $is mapped to⠲, the period cell, so$5and.5both become⠲⠼⠑. The Unified English Braille dollar sign is dot 4 followed by dots 234 (⠈⠎), which is also how liblouis's UEB table (en-ueb-chardefs.uti:sign $ 4-234) defines it.
liblouis's UEB grade 1 table (en-ueb-g1.ctb) marks a to j as the letters that need the letter sign after a number (numericnocontchars, nonumsign 56).
Steps/Code to Reproduce
import asyncio
from pyrit.converter import BrailleConverter
async def main():
converter = BrailleConverter()
for prompt in ["1a", "11", "$5", ".5"]:
result = await converter.convert_async(prompt=prompt)
print(prompt, result.output_text)
asyncio.run(main())
Expected Results
1a ⠼⠁⠰⠁
11 ⠼⠁⠁
$5 ⠈⠎⠼⠑
.5 ⠲⠼⠑
Actual Results
1a ⠼⠁⠁
11 ⠼⠁⠁
$5 ⠲⠼⠑
.5 ⠲⠼⠑
Versions
- PyRIT version: installed from main (
246b659e) in editable mode - Python version: 3.12
I have a fix for both and would like to open a PR for it.
- Lingua principale
- Python
- Stelle
- 4.7k
- Fork
- 980
- Merge medio
- 2g 9h
- PR unite (30g)
- 422
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/PyRIT
-
Conversation drawer shows the previous attack's conversations after switching attacksForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
BUG: within word punctuation insertion can never land at the last two positions of the promptAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di microsoft/PyRIT
Issue simili
-
[oblt-aw][autodoc] Update docs for security org scaffolding and Docs AI menu permission changesForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
external integration integration-submission
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
langchain-ai/docs#7077 ·
I maintainer di solito rispondono entro 1 giorno
-
author-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
acl-org/acl-anthology#10623 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Use context to recognize personal initials and lowercase namesForse già presa @lipikaramaswamy l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
NVIDIA-NeMo/Anonymizer#340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
btclib-org/btclib-node#2083 ·
I maintainer di solito rispondono entro 1 giorno