Changes between Version 79 and Version 80 of ControlSystems/SoftwareTeam/IntroToPython


Ignore:
Timestamp:
Sep 4, 2017, 10:50:29 PM (8 years ago)
Author:
cdelgigante
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/IntroToPython

    v79 v80  
    297297import enchant
    298298d=enchant.Dict("en_US")  # Selects the US english dictionary
    299 bad=check("Helo") # Spell checks the given string, not correctly spelled, returns False
    300 good=check("Hello")  # Correctly spelled word returns True
     299bad=d.check("Helo") # Spell checks the given string, not correctly spelled, returns False
     300good=d.check("Hello")  # Correctly spelled word returns True
    301301}}}
    302302It would be a enormous effort to create your own spell check library, so reusing one saves a lot of time.   We'll be using this when we program robots because a lot of the work we need to do to communicate with the parts of a robot has already been done.  And we want to spend time making robots do things, not figuring out how to communicate with then.