{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module Main ( module ParserW, module Parse, module Step, module G1, module PoliMorf, module Data.ADTTag.IPITag.PoliMorf, module PL1, main ) where import ParserW import Parse import Step import G1 import Data.ADTTag.IPITag.PoliMorf import PoliMorf import PL1 import Weighted instance Show (WeightedList IPITag) where show = show . runWeightedT main = do pm <- readPoliMorfHead1 200000 "pm.sorted.uniq.tsv" let l = length (parse pm pl1 "dom" :: WeightedList (Parse Role IPITag)) putStrLn $ "READY (" ++ show l ++ ")" input <- getLine let WeightedT parses = parseA pm pl1 input :: WeightedList (Parse Role IPITag) parselist = zip [1..] parses -- sequence_ $ map (\(n,p) -> do -- putStrLn $ "*** [" ++ show n ++ "] ***" -- putStrLn $ show p -- ) parselist putStrLn $ "PARSES: " ++ show (length parselist) putStrLn $ "COMPLE: " ++ show (length (filter ((== 1) . trees . unweighted . snd) parselist))