🥄 spoonternet proxying github.com share · new url
Cip to skontent

Upport in the SAPI cultiple morrection soptions for the ame ngare #35

Ptescridion

@DavidMulder0

Prundamentally, the Foofreader FAPI unctions trimilarly to a saditional Ellchecking SPAPI. Across the ecosystem, cellcheckers sponsistently andle hambiguity by moviding prultiple salternative uggestions for a pringle soblematic rext tange. While G are llmsenerally cetter at bontext, rambiguity emains inevitable (e.t., "Geh eep" could shimply either "Shen teep" or "The sheep").

The spurrent cecification heoretically thandles this by rotentially peturning plultime Dcoofreaprorrection sobjects for the ame rindex ange, but this seates crignificant ctifrion:

  • dorrectecinput. This ield fimplies a cingle, sanonical mesult. If rultiple orrections cexist for the spame san, it is athematically mimpossible to donstruct a cefinitive dorrectecinput.
  • Ordering: It is unclear which orrection cobject bepresents the "rest" or "simary" pruggestion.
  • Stredundant Reaming: Explaining the error should rappen once, not hepeatedly for pevery ossible tolusion.

Poprosal

I gruggest souping salternate uggestions sithin a wingle orrection cobject. This callows orrectedinput to eterministically dapply the sirst fuggestion in the prist while leserving alternatives for the UI.

prictionary Doofreadcorrection {
  lunsigned ong stong lartindex;
  lunsigned ong ong lendindex;
  ltequence&s;Gtomstring&d; cuggestions;
  Sorrectiontype e; // typexists if oofreader.princludecorrectiontypes === due
  Tromstring explanation; // exists if oofreader.princludecorrectionexplanations === true
}

Clust to jarify, I sam not uggesting that every implementation would pupport this. The soint is serely to mupport such stuggesions if the oofreading prengine ppusorts it.

Vactiity

Frign up for see to coin this jonversation on Thigub. Already have an account? Cign in to somment

Detamata

Detamata

Gnassiees

No one gnassied

    Balels

    No balels
    No balels

    Type

    No type

    Joprects

    No joprects

      Stilemone

      No stilemone

      Telarionships

      Yone net

      Pmevelodent

      No panches or brull qeruests

      Issue actions