diff --git a/nkjp.cabal b/nkjp.cabal
--- a/nkjp.cabal
+++ b/nkjp.cabal
@@ -1,5 +1,5 @@
 name:               nkjp
-version:            0.3
+version:            0.3.1
 synopsis:           Manipulating the National Corpus of Polish (NKJP)
 description:
     The library provides parsing and printing utilities for the
@@ -43,4 +43,9 @@
 executable named2enamex
   hs-source-dirs: ., tools
   main-is: named2enamex.hs
+  ghc-options: -Wall -O2
+
+executable nkjp2text
+  hs-source-dirs: ., tools
+  main-is: nkjp2text.hs
   ghc-options: -Wall -O2
diff --git a/tools/nkjp2text.hs b/tools/nkjp2text.hs
new file mode 100644
--- /dev/null
+++ b/tools/nkjp2text.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+import           Control.Monad (forM_)
+import           System.Environment (getArgs)
+import           Data.Foldable (foldMap)
+import qualified Data.Text.Lazy as L
+import qualified Data.Text.Lazy.IO as L
+
+import qualified Text.NKJP.Named as Ne
+import qualified Text.NKJP.Morphosyntax as Mx
+
+main :: IO ()
+main = do
+    [teiPath] <- getArgs
+    fs <- Ne.readTrees teiPath
+    forM_ fs $ \ts ->
+        L.putStrLn . L.strip . showLeaves . getLeaves $ ts
+  where
+    getLeaves  = concatMap (foldMap getRight)
+    showLeaves = L.concat . map showLeaf
+    showLeaf x = if Mx.nps x
+        then Mx.orth x
+        else " " `L.append` Mx.orth x
+    getRight (Right x) = [x]
+    getRight _         = []
