documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Debug why spelling mistake wasn't caught

Open Eric-Arellano opened this issue 6 months ago • 8 comments

See https://github.com/Qiskit/documentation/pull/3307/files/253b3e576700fffc4b310ba332b31458c7515e49#r2142809818

Our spellchecker failed to catch the word equivlently in learning/courses/basics-of-quantum-information/quantum-circuits/circuits.ipynb

Not gates (or equivlently, $X$ gates) are also sometimes denoted by a circle around a plus sign:\n

Figure out why this is. To debug, run npm run check:spelling with different configurations to narrow down the problem.

  1. Try an MDX file to see if this is about Jupyter notebooks vs MDX files
  2. Try different variations of the word to see if it's specifically the spelling equivlently. Like try equvlently.

https://github.com/Qiskit/documentation/blob/main/scripts/js/commands/checkSpelling.ts is where our spelling is configured, and https://github.com/Qiskit/documentation/tree/main/scripts/config/cspell is our config.

Eric-Arellano avatar Jun 12 '25 16:06 Eric-Arellano

Hey @Gyan-max, any interest in working on this one? It emphasizes debugging, which is a really good skill to practice. It'd help out the Qiskit docs by potentially finding if our spellchecker is broken in ways we don't expect. However, no worries if you're not interested.

Eric-Arellano avatar Jun 12 '25 16:06 Eric-Arellano

Hey @Gyan-max, any interest in working on this one? It emphasizes debugging, which is a really good skill to practice. It'd help out the Qiskit docs by potentially finding if our spellchecker is broken in ways we don't expect. However, no worries if you're not interested.

On it

Gyan-max avatar Jun 14 '25 04:06 Gyan-max

Hi @Eric-Arellano After investigation, the spellchecker is working as expected for Jupyter notebooks. The original typo was already fixed in the file, which is why it was not flagged. I verified that new typos are correctly detected and reported.

Image

Gyan-max avatar Jun 14 '25 06:06 Gyan-max

Here is another example that the spellcheck missed: https://github.com/Qiskit/documentation/pull/3246#discussion_r2147389952

Is it possible to view the dictionary database that cspell compares against (not the ones we manually add to)? We can see if the items being missed are simply incorrectly spelled there.

abbycross avatar Jun 16 '25 13:06 abbycross

Here is another example that the spellcheck missed: #3246 (comment)

Is it possible to view the dictionary database that cspell compares against (not the ones we manually add to)? We can see if the items being missed are simply incorrectly spelled there.

@abbycross can you please elaborate more.

Gyan-max avatar Jun 16 '25 14:06 Gyan-max

I'm wondering how we make sure that in cspell's default dictionaries, the misspelled words aren't mistakenly considered correctly spelled. For example, I found this: https://cspell.org/docs/dictionaries/searching-dictionaries

BUT I would need to dig a bit deeper to make sure I understand how it works.

abbycross avatar Jun 16 '25 15:06 abbycross

Another example where the spellcheck did not work: https://github.com/Qiskit/documentation/pull/3429/files#r2169892792

abbycross avatar Jun 26 '25 20:06 abbycross

Another example: https://github.com/Qiskit/documentation/issues/4050

abbycross avatar Oct 17 '25 15:10 abbycross