From 70e3920556496e5fecb5fedddf1067b2522fcac7 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 24 Dec 2024 18:51:17 +0530 Subject: Add setup for ocr with tesseract --- src/Chelleport.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Chelleport.hs') 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 -- cgit v1.3.1