Spell Check and correct Multi-Category Tags using Dynamo

I would like to use Spell Check option which is available for Text Notes to apply on Multi-Category Tags as well. Is it possible using Dynamo?

Yes. There are a few posts on this already. Have a look around the forum, and check out the FuzzyDyno package.

Note that you need to spell check the parameter values not the tags themselves.

1 Like

@JacobSmall I have tried searching with FuzzyDyno keyword. But I am unable to find any relevant topic.
If you could help point me towards the post or help paste the solution here.

This blog post should get you started: Fuzzy String Matching - Dynamo BIM

1 Like

I have tried with this. Looks complicated. Is there any alternative method for Beginners?

Nope - winds up that performing a spell check is complicated work.

1 Like

Hello,
here are 2 other solutions (IronPython or Archilab)

the IronPython solution code (using Interrop)

import sys
import clr
import System

clr.AddReference("Microsoft.Office.Interop.Word")
import Microsoft.Office.Interop.Word as Word

clr.AddReference("office")
from Microsoft.Office.Core import *

clr.AddReference("System.Runtime.InteropServices")
import System.Runtime.InteropServices

lstWord = IN[0]
out = []
app = Word.ApplicationClass()
docWord = app.Documents.Add()
# automatically detects the language you are using as you type
languageAutoCheck = app.CheckLanguage 
# the language selected for the Microsoft Word user interface
currentUILangInt = app.Language 
currentUILanguage = System.Enum.ToObject(MsoLanguageID, currentUILangInt)

# check words
for w in lstWord:
	spellingIsCorrect = app.CheckSpelling(w)
	if spellingIsCorrect:
		out.append(w)
	else:
		suggestions = [x.Name for x in app.GetSpellingSuggestions(w)] 
		# get the first suggestion
		out.append(suggestions[0])
		
docWord.Close()
app.Quit()
app = None

OUT = out

pyspellchecker CPython3 package can be also an alternative

2 Likes

Thankyou @c.poupin
I have come to conclusion that spell check isn’t really 100% reliable with correct words. So I would request if you can help me just highlight the misspelt words in the project into say Orange color. Then it would be better to do it manually.