diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-24 18:51:17 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-24 18:51:17 +0530 |
| commit | 70e3920556496e5fecb5fedddf1067b2522fcac7 (patch) | |
| tree | 7e4e88023bdcd5b13dde738f7afedd533a6d7fcd /src/Chelleport.hs | |
| parent | dfdf1600ba251f6b3cfef85f6904d79a1c60b49d (diff) | |
| download | chelleport-70e3920556496e5fecb5fedddf1067b2522fcac7.tar.gz chelleport-70e3920556496e5fecb5fedddf1067b2522fcac7.zip | |
Add setup for ocr with tesseract
Diffstat (limited to 'src/Chelleport.hs')
| -rw-r--r-- | src/Chelleport.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Chelleport.hs b/src/Chelleport.hs index fa21c28..96c9fb6 100644 --- a/src/Chelleport.hs +++ b/src/Chelleport.hs @@ -23,6 +23,14 @@ import Control.Monad.Reader (ReaderT (runReaderT)) import Data.Maybe (fromMaybe, isJust) import qualified SDL +-- run :: IO () +-- run = do +-- ctx <- initializeContext +-- benchmark "ocr" $ do +-- res <- (`runReaderT` ctx) . runAppM $ getWordsOnScreen +-- print $ "---" ++ show (length res) +-- pure () + run :: IO () run = do ctx <- initializeContext @@ -47,7 +55,8 @@ initialState = do stateIsMatched = False, stateIsShiftPressed = False, stateIsDragging = False, - stateRepetition = 1 + stateRepetition = 1, + stateMode = ModeSearch } where rows = 9 |
