Commit c34fcc1bfc26f6470fe4ba9f2e961b70e27adc65

Authored by Mateusz Kopeć
0 parents

initial commit

Showing 49 changed files with 8721 additions and 0 deletions

Too many changes to show.

To preserve performance only 27 of 49 files are displayed.

AbsSumAnnotator/example.txt 0 → 100644
  1 +++ a/AbsSumAnnotator/example.txt
  1 +Z warszawskiego parkietu odeszło dotychczas w różny sposób osiemnaście spółek
  2 +
  3 +Pożegnania
  4 +
  5 +Z tabeli notowań Warszawskiej Giełdy Papierów wartościowych zniknęło dotychczas 18 spółek. W dziesięciu przypadkach to zniknięcie było skutkiem fuzji z inną firmą z tej samej branży, w sześciu - całkowitego wycofania akcji spółki z obrotu publicznego. Jedną spółkę z giełdy usunięto za karę, jedna zaś zbankrutowała.
  6 +
  7 +Przy fuzjach akcjonariusze przejmowanej firmy dostali w zamian akcje spółki przejmującej i choć czasem mogli mieć zastrzeżenia co do parytetu wymiany, takie pożegnania nie budziły tylu emocji co ostateczne wycofanie akcji spółek z obrotu publicznego. Na całkowite odejście z parkietu decydują się coraz częściej inwestorzy strategiczni, którzy po przejęciu kontroli nad spółką nie chcą ponosić kosztów utrzymania jej na giełdzie ani ułatwiać konkurencji dostępu do informacji o firmie. Dotychczas w ten sposób z GPW pożegnało się 6 spółek. W tym roku ich liczba może się zwiększyć zważywszy, że już w prawie dwudziestu spółkach inwestorzy strategiczni kontrolują ponad 90 proc. głosów na WZA, a dzięki bessie pozostałe akcje będą mogli odkupić taniej.
  8 +
  9 +- Bardzo szkoda, że spółka o tak dużej wartości rynkowej opuszcza rynek - komentowali analitycy w lutym 1998 r., gdy amerykański koncern PepsiCo kontrolujący 98,9 proc. akcji Wedla przegłosował na walnym zgromadzeniu akcjonariuszy wycofanie spółki z publicznego obrotu. O swych planach Amerykanie poinformowali co prawda kilka miesięcy wcześniej, ogłaszając w listopadzie 1997 r. publiczne wezwanie do sprzedaży akcji Wedla.
  10 +
  11 +Nie obyło się przy tym bez skandalu, bo tuż przed ogłoszeniem wezwania z ceną znacznie wyższą od rynkowej, kurs akcji spółki gwałtownie wzrósł. Skłoniło to Komisję Papierów Wartościowych i Giełd (KPWiG), a potem prokuraturę do wszczęcia postępowania w sprawie wykorzystania poufnych informacji. Sprawa toczy się do dziś, ale na razie nikomu nie przedstawiono zarzutów. Mimo sprzeciwu kilku drobnych inwestorów, KPWiG w kwietniu zgodziła się na wycofanie akcji Wedla z obrotu. Na pożegnanie z giełdą spółka musiała jeszcze zapłacić 90 tys. zł kary za niedopełnienie obowiązków informacyjnych (przez kilka miesięcy zarząd z opóźnieniem przekazywał komentarze do raportów finansowych).
  12 +
  13 +Gorycz rozstania ze słodyczami
  14 +
  15 +W kwietniu 1998 r. akcje Wedla, które debiutowały w listopadzie 1991 r. (już z PepsiCo jako inwestorem strategicznym), były notowane po GPW po razy ostatni. Wycofanie Wedla z obrotu publicznego zrobiło duże wrażenie na rynku. Nie tylko dlatego, że była to jedna z nielicznych polskich firm z marką znaną także za granicą, a jednocześnie - jedno z pierwszych przedsiębiorstw państwowych wyznaczonych do prywatyzacji (w kwietniu 1990 r.).
  16 +
  17 +Przede wszystkim było to pierwsze w historii GPW "prawdziwe" pożegnanie spółki z giełdą. Wprawdzie jesienią 1997 r. przestały być notowane akcje Banku Gdańskiego i Polifarbu Wrocław, a latem 1998 r. z tabeli zniknęły akcje Polskiego Banku Rozwoju (PBR), ale te firmy w wyniku przejęć stały się częścią innych giełdowych spółek z tej samej branży. Bank Gdański został przejęty przez BIG, Polifarb Wrocław połączył się z Polifarbem Cieszyn, a PBR został wchłonięty przez BRE Bank, który przedtem stoczył walkę o jego przejęcie. Przeszła ona do historii GPW jako pierwsza tak zacięta międzynarodowa rywalizacja i to o niewielki i nie mający nawet sieci oddziałów bank. Ofertami kupna przebijały się trzy duże instytucje finansowe: krajowy BRE Bank, szwedzki Skandinavska Enskilda Banken i niemiecki Bayerische Landesbank, tocząc wojnę podjazdową na wezwania do sprzedaży akcji PBR.
  18 +
  19 +W 1998 r. przewidywano, że po wyciągnięciu Wedla z giełdy, PepsiCo będzie mógł bez rozgłosu wyprzedać po kawałku produkcję wedlowskich słodyczy - co zresztą koncern zrobił. Sprawdziły się też prognozy, że wycofanie Wedla z obrotu publicznego zachęci do podobnej taktyki inne spółki, zwłaszcza kontrolowane przez zagranicznych inwestorów, którzy nie potrzebowali pieniędzy z giełdy, a nie mieli ochoty na odkrywanie kart przed konkurencją. Na następne odejście nie trzeba było długo czekać.
  20 +
  21 +Zakryć karty przed konkurencją
  22 +
  23 +W 1999 r. z giełdy wycofano pierwszą "od zawsze" prywatną spółkę - słupski DomPlast. To największy w Polsce producent wyrobów z plastiku, którego emisja publiczna w 1994 r., niedługo przed pierwszym załamaniem na warszawskiej giełdzie, cieszyła się ogromnym powodzeniem. W 1995 r. spółka zyskała silnego strategicznego inwestora z zagranicy - był nim największy producent wyrobów plastikowych w USA - Rubbermaid. Już w listopadzie 1995 r. ogłosił on publiczne wezwanie do sprzedaży wszystkich akcji DomPlastu, nie kryjąc od początku, że planuje z czasem wycofać spółkę z giełdy. Wówczas w wezwaniu Rubbermaid kupił 89 proc. akcji DomPlastu. Kolejne 7 proc. odkupił w 1999 r. - i wtedy też zrealizował swój plan.
  24 +
  25 +Trzecim zagranicznym inwestorem, który zdecydował się na takie postępowanie, był belgijski CBR, kontrolujący cementownię Górażdże. Uchwałę o wycofaniu akcji tej spółki z giełdy przegłosował na nadzwyczajnym walnym zgromadzeniu akcjonariuszy pod koniec września 1999 r. Nie było to zaskoczeniem - już rok wcześniej, ogłaszając pierwsze wezwanie do sprzedaży akcji Górażdży przedstawiciele CBR zapowiadali, że jeśli to będzie możliwe, wycofają spółkę z giełdy. Zarząd wyjaśniał tę decyzję "niedogodnościami wynikającymi z obowiązków informacyjnych, jakim podlegają spółki publiczne" zwłaszcza w sytuacji, gdy Górażdże jako jedyna cementownia na polskiej giełdzie nie mogły utrzymać w tajemnicy przed konkurencją planów strategicznych.
  26 +
  27 +Dawid i Goliat
  28 +
  29 +Planami strategicznymi nie chciał się też dzielić Polifarb Dębica przejęty przez szwedzki koncern Alcro Beckers, który uznał, że dębicki producent farb nie ma żadnych korzyści ze statusu spółki publicznej. W tym przypadku jednak okazało się, że nie zawsze pożegnanie z giełdą przebiega w takt wyznaczony przez inwestora strategicznego.
  30 +
  31 +Na przeszkodzie planom Alcro Beckers stanął Raimondo Eggink, doradca inwestycyjny z ABN Amro Asset Management. Występując jako osoba prywatna i drobny akcjonariusz (bo posiadacz zaledwie 165 akcji Polifarbu) sprzeciwił się podjętej w listopadzie 1999 r. decyzji NWZA dębickiej spółki, zaskarżając w sądzie uchwałę o wycofaniu spółki z obrotu publicznego. Eggink argumentował, że i on, i pozostali drobni akcjonariusze zostali pokrzywdzeni, gdyż w wezwaniu "ostatniej szansy" przed wycofaniem spółki z giełdy Alcro Beckers wyznaczył cenę akcji Polifarbu na 57 zł, a więc o 15 zł mniej niż płacił, kupując niedługo przedtem pakiety akcji spółki od skarbu państwa i NFI (po 72 zł).
  32 +
  33 +Choć sąd oddalił pozew Egginka ze względów formalnych (Holender nie miał wymaganego do zaskarżenia uchwały 1 proc. głosów na WZA) to i tak Polifarb Dębica mogł przejść do historii giełdy jako pierwsza spółka, której akcjonariusz zaskarżył w sądzie uchwałę WZA o wycofaniu z obrotu publicznego i jako pierwsza firma, która pożegnała się z giełdą dopiero ponad 10 miesięcy po podjęciu takiej uchwały.
  34 +
  35 +Polifarb Dębica zniknął z tabeli giełdowej we wrześniu 2000 roku, ale Raimondo Eggink nie daje za wygraną - odwołał się do Trybunału Konstytucyjnego i liczy, że ten unieważni uchwałę z listopada 1999 r. Natomiast bez większych problemów jesienią 2000 r. z obrotu publicznego zostały wycofane Koszalińskie Zakłady Piwowarskie Brok, przejęte przez niemiecki koncern piwowarski, Holsten, który od czasu wejścia do spółki systematycznie zwiększał nad nią kontrolę.
  36 +
  37 +Pechowe inwestycje
  38 +
  39 +Drobni akcjonariusze, których często oburzają zaniżone ceny, jakie w wezwaniach do sprzedaży akcji oferują strategiczni inwestorzy, mogli się czuć pokrzywdzeni podczas sfinalizowanego wiosną 2000 r. wycofania z giełdy spółki Zasada. Jako powód tej decyzji podano wysokie koszty i brak korzyści z funkcjonowania Zasady jako spółki publicznej. Jej akcje, wiosną 1995 r. sprzedawane w ofercie publicznej po 10 zł, w ogłoszonej jesienią 1999 r. ofercie odsprzedaży założyciel spółki, Sobiesław Zasada skupował po 2,83 zł.
  40 +
  41 +Na jeszcze skromniejsze kwoty mogli liczyć akcjonariusze dwóch spółek, które zniknęły z giełdy wbrew własnej woli - Universalu, który jako jedyny na razie wycofany został z publicznego obrotu przez KPWiG oraz jedynego jak dotąd giełdowego bankruta - Polisy, której akcje w ostatnim dniu notowań potaniały do 3 groszy. W jeszcze gorszej sytuacji znaleźli się ci inwestorzy, którzy przegapili szanse na sprzedaż Polisy; majątek zadłużonej spółki wystarczył tylko na pokrycie roszczeń głównych wierzycieli.
  42 +
  43 +Niewiele zresztą brakowało, aby Universal, który zniknął z tabeli notowań w maju 1999 - z ceną 0,59 zł za akcję na ostatnim notowaniu - był pierwszym bankrutem na GPW. Uratowali go przed tym wierzyciele umarzając w grudniu 1998 r. 40 proc. długu firmy. Ostatecznie, ta ulubiona przez spekulantów spółka (jej akcje, które debiutowały w 1992 r. z ceną 1,05 zł, w szczytowym okresie hossy kosztowały nawet 67 zł) odeszła z giełdy po decyzji KPWiG. Komisja wycofała w 1999 r. Universal z publicznego obrotu karząc go w ten sposób za wielokrotne lekceważenie przepisów o obowiązkach informacyjnych spółek publicznych.
  44 +
  45 +Lepiej w silnej grupie
  46 +
  47 +Od dwóch lat na warszawskiej giełdzie trwa też konsolidacja kilku branż, m. in. mięsnej i budowlanej, której liderzy po kolei połykali kolejnych konkurentów.
  48 +
  49 +Wiosną 1999 r. odbyło się ostatnie notowanie akcji Zakładów Mięsnych Koło, które weszły do grupy budowanej przez swojego wiodącego udziałowca - Zakłady Mięsne w Sokołowie i zniknęły z tabeli w 15 miesięcy od debiutu, co na razie jest najkrótszym stażem wśród giełdowych spółek. Dzięki tej uchwalonej jeszcze w 1998 r. (i początkowo oprotestowanej przez skarb państwa) fuzji Sokołów stał się drugą po Animeksie grupą w branży mięsnej. Kilka miesięcy później, jesienią 1999 r. Sokołów zapowiedział dalszą rozbudowę grupy przez fuzje, a w zasadzie przejęcia kolejnych firm swej branży, w tym notowanych na giełdzie Jarosławia i Farmfoodu oraz Mięstaru, który nie był spółką publiczną. Fuzje sfinalizowane w 2000 r. utworzyły z Sokołowa największą grupę przemysłu mięsnego w kraju.
  50 +
  51 +Podobnie było w branży budowlanej, gdzie całą serię przejęć przeprowadził w krótkim czasie Budimex. W 1999 r. przejął swoje trzy spółki zależne - nie notowany na giełdzie Budimex Warszawa oraz giełdowe Budimex Poznań i Unibud. Fuzje z Budimeksem Poznań i Warszawa udało się sfinalizować jeszcze w 1999 r., natomiast względy formalne opóźniły nieco zakończenie przejęcia Unibudu, którego akcje zniknęły z giełdy na początku 2000 r. Ostatnim z nabytków był przejęty jesienią 2000 r. giełdowy Mostostal Kraków, trzecia spółka, która zniknęła z giełdowej tabeli stając się częścią grupy Budimeksu. Konsolidacja nastąpiła też wśród Narodowych Funduszy Inwestycyjnych, gdzie XI NFI został przejęty przez III NFI (obecnie Jupiter).
  52 +
  53 +Nie najlepsza koniunktura na GPW i spadek kursów akcji spółek może teraz zachęcać do kolejnych działań konsolidacyjnych. Może też skłaniać inwestorów strategicznych do tańszego skupienia akcji i wycofania kontrolowanych przez siebie spółek z obrotu publicznego, zwłaszcza w tych przypadkach, gdy posiadane przez nich pakiety akcji dają prawie całkowitą kontrolę nad spółką i niemal do zera ograniczają płynność jej obrotu.
  54 +
  55 +Dla kilku firm wyjście z giełdy to kwestia dokończenia formalności. Takie decyzje podjęli już akcjonariusze WKSM, Bakomy i Nomi, której inwestor strategiczny - holenderska spółka Eijsvogel BV (należąca do brytyjskiej grupy handlowej Kingfisher) uważa, że wycofanie spółki z obrotu publicznego wzmocni jej zdolności konkurencyjne. Choć odejścia oznaczają dla GPW spadek kapitalizacji, to jak twierdzi Mirosław Kachniewski, rzecznik KPWiG, rynek publiczny jest nobilitacją spółek, a nie miejscem, gdzie przetrzymuje się je na siłę.
  56 +
  57 +Anita Błaszczak
... ...
AbsSumAnnotator/pom.xml 0 → 100644
  1 +++ a/AbsSumAnnotator/pom.xml
  1 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3 + <modelVersion>4.0.0</modelVersion>
  4 + <groupId>ipipan.atlas</groupId>
  5 + <artifactId>abssumannotator</artifactId>
  6 + <version>0.1</version>
  7 + <name>AbsSumAnnotator</name>
  8 + <build>
  9 + <plugins>
  10 + <plugin>
  11 + <artifactId>maven-assembly-plugin</artifactId>
  12 + <configuration>
  13 + <archive>
  14 + <manifest>
  15 + <mainClass>ipipan.atlas.abssumannotator.main.AbsSumAnnotator</mainClass>
  16 + </manifest>
  17 + </archive>
  18 + <descriptorRefs>
  19 + <descriptorRef>jar-with-dependencies</descriptorRef>
  20 + </descriptorRefs>
  21 + </configuration>
  22 + </plugin>
  23 + </plugins>
  24 + </build>
  25 + <dependencies>
  26 + <dependency>
  27 + <groupId>log4j</groupId>
  28 + <artifactId>log4j</artifactId>
  29 + <version>1.2.16</version>
  30 + </dependency>
  31 + <dependency>
  32 + <groupId>org.codehaus.woodstox</groupId>
  33 + <artifactId>stax2-api</artifactId>
  34 + <version>3.1.1</version>
  35 + </dependency>
  36 + </dependencies>
  37 +</project>
0 38 \ No newline at end of file
... ...
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/basic/Text.java 0 → 100644
  1 +++ a/AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/basic/Text.java
  1 +package pl.waw.ipipan.zil.summarization.abssumannotator.basic;
  2 +
  3 +import java.util.List;
  4 +
  5 +public class Text {
  6 +
  7 + private String text;
  8 +
  9 + private List<String> summaries;
  10 +
  11 + public void setText(String text) {
  12 + this.text = text;
  13 + }
  14 +
  15 + public String getText() {
  16 + return text;
  17 + }
  18 +
  19 + public int getTextWordsCount() {
  20 + return getStringWordCount(text);
  21 + }
  22 +
  23 + public int getSummaryWordsCount(int number) {
  24 + return getStringWordCount(getSummary(number));
  25 + }
  26 +
  27 + public static int getStringWordCount(String string) {
  28 + return string.split("[ ]+").length;
  29 + }
  30 +
  31 + public void setSummaries(List<String> summaries) {
  32 + this.summaries = summaries;
  33 + }
  34 +
  35 + public String getSummary(int number) {
  36 + return summaries.get(number);
  37 + }
  38 +
  39 + public List<String> getSummaries() {
  40 + return summaries;
  41 + }
  42 +
  43 + public void setSummary(int summNumber, String sum) {
  44 + summaries.set(summNumber, sum);
  45 + }
  46 +}
... ...
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/io/SummaryFileIO.java 0 → 100644
  1 +++ a/AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/io/SummaryFileIO.java
  1 +package pl.waw.ipipan.zil.summarization.abssumannotator.io;
  2 +
  3 +
  4 +import java.io.BufferedReader;
  5 +import java.io.BufferedWriter;
  6 +import java.io.File;
  7 +import java.io.FileInputStream;
  8 +import java.io.FileOutputStream;
  9 +import java.io.IOException;
  10 +import java.io.InputStreamReader;
  11 +import java.io.OutputStreamWriter;
  12 +import java.util.ArrayList;
  13 +import java.util.List;
  14 +
  15 +import org.apache.log4j.Logger;
  16 +
  17 +import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text;
  18 +import pl.waw.ipipan.zil.summarization.abssumannotator.main.AbsSumAnnotator;
  19 +
  20 +public class SummaryFileIO {
  21 +
  22 + private static final String SUMMARIES = "#### SUMMARIES ####";
  23 + private static final String SUMMARY_START = "#### SUMMARY START ####";
  24 + private static final String SUMMARY_END = "#### SUMMARY END ####";
  25 +
  26 + private static final Logger logger = Logger.getLogger(SummaryFileIO.class);
  27 +
  28 + public static boolean saveSummary(File summaryFile, Text text) {
  29 + logger.info("Saving text with summaries in file: " + summaryFile);
  30 + BufferedWriter bw = null;
  31 +
  32 + try {
  33 + bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(summaryFile), "UTF-8"));
  34 +
  35 + bw.append(text.getText() + "\n");
  36 + bw.append(SUMMARIES + "\n");
  37 +
  38 + for (String summary : text.getSummaries())
  39 + writeSummary(bw, summary);
  40 +
  41 + } catch (IOException e) {
  42 + logger.error("Error writing summary: " + e.getLocalizedMessage());
  43 + return false;
  44 + } finally {
  45 + if (bw != null)
  46 + try {
  47 + bw.close();
  48 + } catch (IOException e) {
  49 + logger.error("Error closing summary file: " + e.getLocalizedMessage());
  50 + return false;
  51 + }
  52 + }
  53 + return true;
  54 + }
  55 +
  56 + private static void writeSummary(BufferedWriter bw, String summary) throws IOException {
  57 + bw.append(SUMMARY_START + "\n");
  58 + bw.append(summary + "\n");
  59 + bw.append(SUMMARY_END + "\n");
  60 + }
  61 +
  62 + public static Text loadText(File input) {
  63 +
  64 + logger.info("Loading text with summaries from file: " + input);
  65 + BufferedReader br = null;
  66 +
  67 + Text t = new Text();
  68 +
  69 + try {
  70 + br = new BufferedReader(new InputStreamReader(new FileInputStream(input), "UTF-8"));
  71 + String line = null;
  72 + StringBuffer fullText = new StringBuffer();
  73 + List<String> summaries = new ArrayList<String>();
  74 + while ((line = br.readLine()) != null) {
  75 + if (line.startsWith(SUMMARIES))
  76 + summaries = loadSummaries(br);
  77 + else
  78 + fullText.append(line + "\n");
  79 + }
  80 +
  81 + while (summaries.size() < AbsSumAnnotator.SUMMARIES_COUNT) {
  82 + summaries.add("");
  83 + }
  84 +
  85 + t.setSummaries(summaries);
  86 + t.setText(fullText.toString());
  87 +
  88 + } catch (IOException e) {
  89 + logger.error("Error reading text: " + e.getLocalizedMessage());
  90 + return null;
  91 + } finally {
  92 + try {
  93 + if (br != null)
  94 + br.close();
  95 + } catch (IOException e) {
  96 + logger.error("Error closing text file: " + e.getLocalizedMessage());
  97 + return null;
  98 + }
  99 + }
  100 +
  101 + return t;
  102 + }
  103 +
  104 + private static List<String> loadSummaries(BufferedReader br) throws IOException {
  105 +
  106 + List<String> summaries = new ArrayList<String>();
  107 +
  108 + String summary = null;
  109 + while ((summary = loadSummary(br)) != null)
  110 + summaries.add(summary);
  111 +
  112 + return summaries;
  113 + }
  114 +
  115 + private static String loadSummary(BufferedReader br) throws IOException {
  116 + StringBuffer summary = new StringBuffer();
  117 +
  118 + String line = null;
  119 + boolean inside = false;
  120 + while ((line = br.readLine()) != null) {
  121 + if (line.startsWith(SUMMARY_END))
  122 + break;
  123 +
  124 + if (inside)
  125 + summary.append(line + "\n");
  126 +
  127 + if (line.startsWith(SUMMARY_START))
  128 + inside = true;
  129 + }
  130 +
  131 + if (summary.length() == 0 && !inside)
  132 + return null;
  133 +
  134 + return summary.toString();
  135 + }
  136 +
  137 +}
... ...
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/AbsSumAnnotator.java 0 → 100644
  1 +++ a/AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/AbsSumAnnotator.java
  1 +package pl.waw.ipipan.zil.summarization.abssumannotator.main;
  2 +
  3 +
  4 +import java.awt.Cursor;
  5 +import java.awt.Dimension;
  6 +import java.awt.Font;
  7 +import java.awt.Insets;
  8 +import java.awt.Toolkit;
  9 +import java.awt.event.ActionEvent;
  10 +import java.awt.event.ActionListener;
  11 +import java.awt.event.InputEvent;
  12 +import java.awt.event.KeyEvent;
  13 +import java.awt.event.WindowAdapter;
  14 +import java.awt.event.WindowEvent;
  15 +import java.io.File;
  16 +import java.io.IOException;
  17 +import java.net.URL;
  18 +import java.util.Enumeration;
  19 +
  20 +import javax.swing.ButtonGroup;
  21 +import javax.swing.JEditorPane;
  22 +import javax.swing.JFileChooser;
  23 +import javax.swing.JFrame;
  24 +import javax.swing.JMenu;
  25 +import javax.swing.JMenuBar;
  26 +import javax.swing.JMenuItem;
  27 +import javax.swing.JOptionPane;
  28 +import javax.swing.JRadioButtonMenuItem;
  29 +import javax.swing.JScrollPane;
  30 +import javax.swing.JSplitPane;
  31 +import javax.swing.JTabbedPane;
  32 +import javax.swing.JTextArea;
  33 +import javax.swing.KeyStroke;
  34 +import javax.swing.SwingUtilities;
  35 +import javax.swing.UIManager;
  36 +import javax.swing.filechooser.FileFilter;
  37 +
  38 +import org.apache.log4j.Logger;
  39 +
  40 +import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text;
  41 +import pl.waw.ipipan.zil.summarization.abssumannotator.io.SummaryFileIO;
  42 +
  43 +public class AbsSumAnnotator extends JFrame implements Runnable {
  44 +
  45 + public static final int SUMMARIES_COUNT = 3;
  46 +
  47 + private static final String WINDOW_TITLE = "ASE v0.9";
  48 +
  49 + private static final long serialVersionUID = -3830790411182131318L;
  50 +
  51 + private static final Logger logger = Logger.getLogger(AbsSumAnnotator.class);
  52 +
  53 + private static final int TEXT_HEIGTH = 400;
  54 + private static final int HEIGTH = 600;
  55 + private static final int WIDTH = 800;
  56 +
  57 + private JMenuItem save;
  58 +
  59 + private File currentFile = null;
  60 + private boolean unsavedChanges = false;
  61 +
  62 + private JTabbedPane tabbedPane;
  63 + private JTextArea textPane;
  64 +
  65 + private float displayFontSize;
  66 +
  67 + private Text currentText;
  68 +
  69 + public static void main(String[] args) {
  70 + if (args.length != 0 && args.length != 1) {
  71 + logger.error("Wrong usage! Should be: java -jar " + AbsSumAnnotator.class.getSimpleName() + " [input file]");
  72 + return;
  73 + }
  74 + final AbsSumAnnotator summanno = new AbsSumAnnotator();
  75 + try {
  76 + SwingUtilities.invokeAndWait(summanno);
  77 + } catch (Exception e) {
  78 + logger.error("Error starting application: " + e.getLocalizedMessage());
  79 + e.printStackTrace();
  80 + return;
  81 + }
  82 +
  83 + if (args.length == 1) {
  84 + final File input = new File(args[0]);
  85 + if (input.exists()) {
  86 + SwingUtilities.invokeLater(new Runnable() {
  87 + @Override
  88 + public void run() {
  89 + summanno.loadFile(input);
  90 + }
  91 + });
  92 + } else {
  93 + logger.error("Input file: " + input + " doesn't exist!");
  94 + }
  95 + }
  96 + }
  97 +
  98 + @Override
  99 + public void run() {
  100 + displayFontSize = loadDisplayFontSize();
  101 +
  102 + textPane = new JTextArea();
  103 + textPane.setEditable(false);
  104 + textPane.setLineWrap(true);
  105 + textPane.setWrapStyleWord(true);
  106 + textPane.setMargin(new Insets(10, 10, 10, 10));
  107 +
  108 + tabbedPane = new JTabbedPane();
  109 +
  110 + JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  111 + splitPane.setTopComponent(new JScrollPane(textPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
  112 + JScrollPane.HORIZONTAL_SCROLLBAR_NEVER));
  113 + splitPane.setBottomComponent(tabbedPane);
  114 + splitPane.setDividerLocation(TEXT_HEIGTH);
  115 + this.getContentPane().add(splitPane);
  116 +
  117 + this.setTitle(WINDOW_TITLE);
  118 + this.createMenu();
  119 + this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
  120 + this.addWindowListener(new MainWindowListener());
  121 + this.setSize(WIDTH, HEIGTH);
  122 + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  123 + this.setLocation((screenSize.width - WIDTH) / 2, (screenSize.height - HEIGTH) / 2);
  124 + this.setVisible(true);
  125 + }
  126 +
  127 + private float loadDisplayFontSize() {
  128 + float result = 12f;
  129 + logger.info("Using default font size.");
  130 + return result;
  131 + }
  132 +
  133 + private void createMenu() {
  134 + JMenuBar menu = new JMenuBar();
  135 + this.setJMenuBar(menu);
  136 +
  137 + JMenu file = new JMenu("File");
  138 + menu.add(file);
  139 +
  140 + JMenuItem open = new JMenuItem("Open");
  141 + open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
  142 + open.addActionListener(new ActionListener() {
  143 + @Override
  144 + public void actionPerformed(ActionEvent e) {
  145 + requestOpenFile();
  146 + }
  147 + });
  148 + file.add(open);
  149 +
  150 + save = new JMenuItem("Save");
  151 + save.setEnabled(false);
  152 + save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
  153 + save.addActionListener(new ActionListener() {
  154 + @Override
  155 + public void actionPerformed(ActionEvent e) {
  156 + requestSaveFile();
  157 + }
  158 + });
  159 + file.add(save);
  160 +
  161 + JMenuItem exit = new JMenuItem("Exit");
  162 + exit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK));
  163 + exit.addActionListener(new ActionListener() {
  164 + @Override
  165 + public void actionPerformed(ActionEvent e) {
  166 + requestExit();
  167 + }
  168 + });
  169 + file.add(exit);
  170 +
  171 + JMenu other = new JMenu("Other");
  172 +
  173 + ButtonGroup fontSizeButtonGroup = new ButtonGroup();
  174 + JMenu setFontSize = new JMenu("Change font size");
  175 + for (int z = 8; z < 25; z = z + 2) {
  176 +
  177 + final int currentFontSize = z;
  178 +
  179 + JRadioButtonMenuItem temp = new JRadioButtonMenuItem(z + "");
  180 + if (z == displayFontSize) {
  181 + temp.setSelected(true);
  182 + }
  183 + temp.addActionListener(new ActionListener() {
  184 + @Override
  185 + public void actionPerformed(ActionEvent ae) {
  186 + requestSetFontSize(currentFontSize);
  187 + }
  188 + });
  189 + fontSizeButtonGroup.add(temp);
  190 + setFontSize.add(temp);
  191 + }
  192 + other.add(setFontSize);
  193 +
  194 + JMenuItem help = new JMenuItem("Help");
  195 + help.addActionListener(new ActionListener() {
  196 + @Override
  197 + public void actionPerformed(ActionEvent e) {
  198 + requestShowHelp();
  199 + }
  200 + });
  201 + other.add(help);
  202 +
  203 + menu.add(other);
  204 + }
  205 +
  206 + protected void requestSetFontSize(float currentFontSize) {
  207 + logger.info("Setting font size: " + currentFontSize);
  208 + displayFontSize = currentFontSize;
  209 +
  210 + Enumeration<Object> enumer = UIManager.getDefaults().keys();
  211 + while (enumer.hasMoreElements()) {
  212 + Object key = enumer.nextElement();
  213 + Object value = UIManager.get(key);
  214 + if (value instanceof Font) {
  215 + UIManager.put(key, new javax.swing.plaf.FontUIResource(((Font) value).deriveFont(currentFontSize)));
  216 + }
  217 + }
  218 + SwingUtilities.updateComponentTreeUI(this);
  219 + }
  220 +
  221 + private final void requestShowHelp() {
  222 + JFrame helpFrame = new JFrame("Help");
  223 + helpFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  224 +
  225 + JEditorPane editorPane = new JEditorPane();
  226 + editorPane.setEditable(false);
  227 + URL helpURL = AbsSumAnnotator.class.getClassLoader().getResource("help.html");
  228 + if (helpURL != null) {
  229 + try {
  230 + editorPane.setPage(helpURL);
  231 + } catch (IOException e) {
  232 + logger.error("Attempted to read a bad URL: " + helpURL);
  233 + }
  234 + } else {
  235 + logger.error("Couldn't find file: help.html");
  236 + }
  237 +
  238 + // Put the editor pane in a scroll pane.
  239 + JScrollPane editorScrollPane = new JScrollPane(editorPane);
  240 + editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
  241 + editorScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  242 + editorScrollPane.setPreferredSize(new Dimension(800, 600));
  243 + editorScrollPane.setMinimumSize(new Dimension(30, 30));
  244 +
  245 + helpFrame.getContentPane().add(editorScrollPane);
  246 + helpFrame.pack();
  247 + helpFrame.setVisible(true);
  248 + }
  249 +
  250 + private void requestSaveFile() {
  251 + boolean success = SummaryFileIO.saveSummary(currentFile, currentText);
  252 +
  253 + if (success) {
  254 + unsavedChanges = false;
  255 + setTitle(WINDOW_TITLE + " file: " + currentFile.getName());
  256 + save.setEnabled(false);
  257 + } else {
  258 + showError("Error saving file: " + currentFile);
  259 + }
  260 + }
  261 +
  262 + private final void requestOpenFile() {
  263 + if (!askToSaveChanges())
  264 + return;
  265 +
  266 + JFileChooser chooser;
  267 + if (currentFile == null)
  268 + chooser = new JFileChooser();
  269 + else
  270 + chooser = new JFileChooser(currentFile.getParentFile());
  271 +
  272 + chooser.setFileFilter(new SummannotatorFileFilter());
  273 + int result = chooser.showOpenDialog(this);
  274 +
  275 + if (result == JFileChooser.APPROVE_OPTION) {
  276 + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  277 + this.loadFile(chooser.getSelectedFile());
  278 + this.setCursor(null);
  279 + }
  280 + }
  281 +
  282 + private boolean askToSaveChanges() {
  283 + if (!unsavedChanges)
  284 + return true;
  285 +
  286 + int result = JOptionPane.showOptionDialog(this, "Do you want to save changes?", "Unsaved changes",
  287 + JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null);
  288 +
  289 + if (result == JOptionPane.CANCEL_OPTION)
  290 + return false;
  291 +
  292 + if (result == JOptionPane.YES_OPTION)
  293 + requestSaveFile();
  294 +
  295 + return true;
  296 + }
  297 +
  298 + private final void requestExit() {
  299 + if (!askToSaveChanges())
  300 + return;
  301 +
  302 + logger.info("Exiting.");
  303 + System.exit(0);
  304 + }
  305 +
  306 + private final void loadFile(File input) {
  307 + tabbedPane.removeAll();
  308 +
  309 + if (!input.exists()) {
  310 + String err = "File " + input + " doesn't exist!";
  311 + logger.error(err);
  312 + showError(err);
  313 + return;
  314 + }
  315 +
  316 + currentText = SummaryFileIO.loadText(input);
  317 + textPane.setText(currentText.getText());
  318 + textPane.setCaretPosition(0);
  319 +
  320 + int allWords = currentText.getTextWordsCount();
  321 + double[] proportions = { 0.2, 0.1, 0.05 };
  322 + String[] labels = { "20%", "10%", "5%" };
  323 +
  324 + for (int i = 0; i < 3; i++) {
  325 + int wordsInSumm = (int) (allWords * proportions[i]);
  326 + MyTab tab = new MyTab(this, currentText.getSummary(i), i, allWords, wordsInSumm);
  327 + tabbedPane.addTab(labels[i] + " summary", tab);
  328 + }
  329 +
  330 + currentFile = input;
  331 + setTitle(WINDOW_TITLE + " file: " + currentFile.getName());
  332 + }
  333 +
  334 + private void showError(String string) {
  335 + JOptionPane.showMessageDialog(this, string, "Error", JOptionPane.ERROR_MESSAGE);
  336 + }
  337 +
  338 + private final class SummannotatorFileFilter extends FileFilter {
  339 + @Override
  340 + public String getDescription() {
  341 + return "TXT files";
  342 + }
  343 +
  344 + @Override
  345 + public boolean accept(File f) {
  346 + return f.getName().endsWith(".txt") || f.isDirectory();
  347 + }
  348 + }
  349 +
  350 + private class MainWindowListener extends WindowAdapter {
  351 +
  352 + @Override
  353 + public void windowClosing(WindowEvent we) {
  354 + requestExit();
  355 + }
  356 + }
  357 +
  358 + public void summaryChanged(int summNumber, String text) {
  359 + unsavedChanges = true;
  360 + save.setEnabled(true);
  361 + setTitle(WINDOW_TITLE + " file: " + currentFile.getName() + " " + "[unsaved changes]");
  362 + currentText.setSummary(summNumber, text);
  363 + }
  364 +
  365 +}
... ...
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/MyTab.java 0 → 100644
  1 +++ a/AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/MyTab.java
  1 +package pl.waw.ipipan.zil.summarization.abssumannotator.main;
  2 +
  3 +
  4 +import java.awt.BorderLayout;
  5 +import java.awt.Insets;
  6 +import java.awt.event.ActionEvent;
  7 +import java.awt.event.KeyEvent;
  8 +
  9 +import javax.swing.AbstractAction;
  10 +import javax.swing.Box;
  11 +import javax.swing.BoxLayout;
  12 +import javax.swing.JButton;
  13 +import javax.swing.JComponent;
  14 +import javax.swing.JLabel;
  15 +import javax.swing.JPanel;
  16 +import javax.swing.JProgressBar;
  17 +import javax.swing.JScrollPane;
  18 +import javax.swing.JTextArea;
  19 +import javax.swing.KeyStroke;
  20 +import javax.swing.event.UndoableEditEvent;
  21 +import javax.swing.event.UndoableEditListener;
  22 +import javax.swing.undo.CannotRedoException;
  23 +import javax.swing.undo.UndoManager;
  24 +
  25 +import org.apache.log4j.Logger;
  26 +
  27 +import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text;
  28 +
  29 +public class MyTab extends JPanel {
  30 +
  31 + private static final long serialVersionUID = 3656861958564714263L;
  32 +
  33 + private static final Logger logger = Logger.getLogger(MyTab.class);
  34 +
  35 + private JTextArea textArea;
  36 + private JProgressBar pb;
  37 +
  38 + private int targetSegmentCount;
  39 + private int allSegmentCount;
  40 +
  41 + private AbsSumAnnotator sumanno;
  42 + private int summNumber;
  43 +
  44 + private UndoManager undoManager;
  45 + private JButton undoButton;
  46 + private JButton redoButton;
  47 +
  48 + public MyTab(AbsSumAnnotator absSumAnnotator, String summary, int summNumber, int allSegmentCount,
  49 + int targetSegmentCount) {
  50 +
  51 + this.sumanno = absSumAnnotator;
  52 + this.summNumber = summNumber;
  53 +
  54 + this.targetSegmentCount = targetSegmentCount;
  55 + this.allSegmentCount = allSegmentCount;
  56 +
  57 + textArea = new JTextArea(summary);
  58 + textArea.setLineWrap(true);
  59 + textArea.setWrapStyleWord(true);
  60 + textArea.setMargin(new Insets(10, 10, 10, 10));
  61 +
  62 + undoManager = new UndoManager();
  63 + UndoAction undoAction = new UndoAction();
  64 + RedoAction redoAction = new RedoAction();
  65 + undoButton = new JButton(undoAction);
  66 + redoButton = new JButton(redoAction);
  67 +
  68 + textArea.getDocument().addUndoableEditListener(new UndoableEditListener() {
  69 + @Override
  70 + public void undoableEditHappened(UndoableEditEvent e) {
  71 + undoManager.addEdit(e.getEdit());
  72 + summaryChanged(false);
  73 + updateButtons();
  74 + }
  75 + });
  76 +
  77 + this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
  78 + KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK), "undo");
  79 + this.getActionMap().put("undo", undoAction);
  80 + this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
  81 + KeyStroke.getKeyStroke(KeyEvent.VK_Y, KeyEvent.CTRL_MASK), "redo");
  82 + this.getActionMap().put("redo", redoAction);
  83 +
  84 + JScrollPane textAreaScrollPane = new JScrollPane(textArea);
  85 +
  86 + pb = new JProgressBar(0, targetSegmentCount);
  87 + JLabel all = new JLabel("Words in text: " + allSegmentCount);
  88 + JLabel summ = new JLabel("Words in summary: " + targetSegmentCount);
  89 +
  90 + JPanel bottomLeftPanel = new JPanel();
  91 + bottomLeftPanel.setLayout(new BoxLayout(bottomLeftPanel, BoxLayout.Y_AXIS));
  92 + bottomLeftPanel.add(pb);
  93 + bottomLeftPanel.add(all);
  94 + bottomLeftPanel.add(summ);
  95 + bottomLeftPanel.add(Box.createVerticalStrut(8));
  96 + bottomLeftPanel.add(undoButton);
  97 + bottomLeftPanel.add(Box.createVerticalStrut(3));
  98 + bottomLeftPanel.add(redoButton);
  99 +
  100 + this.setLayout(new BorderLayout());
  101 + this.add(textAreaScrollPane, BorderLayout.CENTER);
  102 + this.add(bottomLeftPanel, BorderLayout.LINE_START);
  103 +
  104 + summaryChanged(true);
  105 + updateButtons();
  106 + }
  107 +
  108 + protected void updateButtons() {
  109 + undoButton.setText(undoManager.getUndoPresentationName() + " (CTRL+Z)");
  110 + redoButton.setText(undoManager.getRedoPresentationName() + " (CTRL+Y)");
  111 + undoButton.setEnabled(undoManager.canUndo());
  112 + redoButton.setEnabled(undoManager.canRedo());
  113 + }
  114 +
  115 + private void summaryChanged(boolean quiet) {
  116 + int chosenWords = Text.getStringWordCount(textArea.getText());
  117 +
  118 + pb.setValue(chosenWords);
  119 + pb.setStringPainted(true);
  120 + if (targetSegmentCount == 0)
  121 + pb.setString(chosenWords + "/0 = -- %");
  122 + else
  123 + pb.setString(chosenWords + "/" + targetSegmentCount + " = " + (100 * chosenWords / targetSegmentCount)
  124 + + "%");
  125 +
  126 + if (!quiet)
  127 + sumanno.summaryChanged(summNumber, textArea.getText());
  128 + }
  129 +
  130 + public String getName() {
  131 + return (int) (targetSegmentCount * 100.0 / allSegmentCount) + "% summary";
  132 + }
  133 +
  134 + private class UndoAction extends AbstractAction {
  135 +
  136 + private static final long serialVersionUID = 640721327092571644L;
  137 +
  138 + @Override
  139 + public void actionPerformed(ActionEvent e) {
  140 + if (undoManager.canUndo()) {
  141 + try {
  142 + undoManager.undo();
  143 + summaryChanged(false);
  144 + } catch (CannotRedoException cre) {
  145 + logger.error("Error when undoing:" + cre.getLocalizedMessage());
  146 + }
  147 + updateButtons();
  148 + }
  149 + }
  150 +
  151 + }
  152 +
  153 + private class RedoAction extends AbstractAction {
  154 +
  155 + private static final long serialVersionUID = 640721327092571644L;
  156 +
  157 + @Override
  158 + public void actionPerformed(ActionEvent e) {
  159 + if (undoManager.canRedo()) {
  160 + try {
  161 + undoManager.redo();
  162 + summaryChanged(false);
  163 + } catch (CannotRedoException cre) {
  164 + logger.error("Error when redoing:" + cre.getLocalizedMessage());
  165 + }
  166 + updateButtons();
  167 + }
  168 + }
  169 +
  170 + }
  171 +}
... ...
AbsSumAnnotator/src/main/resources/help.html 0 → 100644
  1 +++ a/AbsSumAnnotator/src/main/resources/help.html
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5 +<title>Help</title>
  6 +</head>
  7 +<body>
  8 +
  9 +<h2>General</h2>
  10 +
  11 +<p>Abstract Summary Editor is a program for manual abstract summary creation and edition.</p>
  12 +
  13 +<p>When we open a file in it, int the top pane the original text to summarize is shown.
  14 +In the bottom we can see 3 tabs, each corresponding to a different summary size: 20%, 10% and 5%.
  15 +The summary of given size should be written in the right text area. The left side of the bottom
  16 +pane presents current size of the summary with respect to the desired size (so a 100% means
  17 +that summary is of correct size, not that it contains all words from the original text).</p>
  18 +
  19 +<h2>Changing display size</h2>
  20 +<p>To change display size, choose from "Other" menu option "Change font size"
  21 +and select desired value. Settings are reset to default after the program is closed.</p>
  22 +
  23 +<h2>Format of input/output files</h2>
  24 +<p>Input file to the program should be in raw TXT format, with UTF-8 encoding.</p>
  25 +
  26 +<p>Summaries are appended to the end of text after saving (and separated by special lines).
  27 +It's better not to try to edit this file manually in normal text editor.</p>
  28 +
  29 +<p>Is the summaries were saved, they are loaded the next time we open the same file.</p>
  30 +
  31 +</body>
  32 +</html>
0 33 \ No newline at end of file
... ...
AbsSumAnnotator/target/classes/help.html 0 → 100644
  1 +++ a/AbsSumAnnotator/target/classes/help.html
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5 +<title>Help</title>
  6 +</head>
  7 +<body>
  8 +
  9 +<h2>General</h2>
  10 +
  11 +<p>Abstract Summary Editor is a program for manual abstract summary creation and edition.</p>
  12 +
  13 +<p>When we open a file in it, int the top pane the original text to summarize is shown.
  14 +In the bottom we can see 3 tabs, each corresponding to a different summary size: 20%, 10% and 5%.
  15 +The summary of given size should be written in the right text area. The left side of the bottom
  16 +pane presents current size of the summary with respect to the desired size (so a 100% means
  17 +that summary is of correct size, not that it contains all words from the original text).</p>
  18 +
  19 +<h2>Changing display size</h2>
  20 +<p>To change display size, choose from "Other" menu option "Change font size"
  21 +and select desired value. Settings are reset to default after the program is closed.</p>
  22 +
  23 +<h2>Format of input/output files</h2>
  24 +<p>Input file to the program should be in raw TXT format, with UTF-8 encoding.</p>
  25 +
  26 +<p>Summaries are appended to the end of text after saving (and separated by special lines).
  27 +It's better not to try to edit this file manually in normal text editor.</p>
  28 +
  29 +<p>Is the summaries were saved, they are loaded the next time we open the same file.</p>
  30 +
  31 +</body>
  32 +</html>
0 33 \ No newline at end of file
... ...
ClauseAnnotator/example.xml 0 → 100644
  1 +++ a/ClauseAnnotator/example.xml
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<DOCUMENT>
  3 + <S ID="S0">
  4 + <CLAUSE ID="CLAUSE0">
  5 + <W ID="W0" LEMMA="przed" POS="prep:inst:nwok">Przed</W>
  6 + <W ID="W1" LEMMA="rok" POS="subst:pl:inst:m3">laty</W>
  7 + <W ID="W2" LEMMA="żyć" POS="praet:pl:m1:imperf">żyli</W>
  8 + <W ID="W3" LEMMA="się" POS="siebie:dat">sobie</W>
  9 + <W ID="W4" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  10 + <W ID="W5" LEMMA="i" POS="conj">i</W>
  11 + <W ID="W6" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  12 + <W ID="W7" LEMMA="," POS="interp">,</W>
  13 + </CLAUSE>
  14 + <CLAUSE ID="CLAUSE1">
  15 + <W ID="W8" LEMMA="który" POS="adj:pl:nom:m1:pos">którzy</W>
  16 + <W ID="W9" LEMMA="powtarzać" POS="praet:pl:m1:imperf">powtarzali</W>
  17 + <W ID="W10" LEMMA="codziennie" POS="adv:pos">codziennie</W>
  18 + <W ID="W11" LEMMA=":" POS="interp">:</W>
  19 + </CLAUSE>
  20 + <CLAUSE ID="CLAUSE2">
  21 + <W ID="W12" LEMMA="-" POS="interp">-</W>
  22 + <W ID="W13" LEMMA="ach" POS="interj">Ach</W>
  23 + <W ID="W14" LEMMA="," POS="interp">,</W>
  24 + <W ID="W15" LEMMA="gdyby" POS="comp">gdyby</W>
  25 + <W ID="W16" LEMMA="być" POS="aglt:pl:pri:imperf:nwok">śmy</W>
  26 + <W ID="W17" LEMMA="mieć" POS="praet:pl:m1:imperf">mieli</W>
  27 + <W ID="W18" LEMMA="dziecko" POS="subst:sg:acc:n">dziecko</W>
  28 + <W ID="W19" LEMMA="!" POS="interp">!</W>
  29 + </CLAUSE>
  30 + <CLAUSE ID="CLAUSE3">
  31 + <W ID="W20" LEMMA="-" POS="interp">-</W>
  32 + <W ID="W21" LEMMA="a" POS="conj">a</W>
  33 + <W ID="W22" LEMMA="dziecko" POS="subst:sg:gen:n">dziecka</W>
  34 + <W ID="W23" LEMMA="wciąż" POS="adv">wciąż</W>
  35 + <W ID="W24" LEMMA="nie" POS="qub">nie</W>
  36 + <W ID="W25" LEMMA="mieć" POS="praet:pl:m1:imperf">mieli</W>
  37 + <W ID="W26" LEMMA="." POS="interp">.</W>
  38 + </CLAUSE>
  39 + </S>
  40 + <S ID="S1">
  41 + <CLAUSE ID="CLAUSE4">
  42 + <W ID="W27" LEMMA="zdarzyć" POS="praet:sg:n:perf">Zdarzyło</W>
  43 + <W ID="W28" LEMMA="się" POS="qub">się</W>
  44 + <W ID="W29" LEMMA="pewny" POS="adj:sg:gen:m3:pos">pewnego</W>
  45 + <W ID="W30" LEMMA="raz" POS="subst:sg:gen:m3">razu</W>
  46 + <W ID="W31" LEMMA="," POS="interp">,</W>
  47 + </CLAUSE>
  48 + <CLAUSE ID="CLAUSE5">
  49 + <W ID="W32" LEMMA="kiedy" POS="adv">kiedy</W>
  50 + <W ID="W33" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  51 + <W ID="W34" LEMMA="zażywać" POS="praet:sg:f:imperf">zażywała</W>
  52 + <W ID="W35" LEMMA="kąpiel" POS="subst:sg:gen:f">kąpieli</W>
  53 + <W ID="W36" LEMMA="," POS="interp">,</W>
  54 + </CLAUSE>
  55 + <CLAUSE ID="CLAUSE6">
  56 + <W ID="W37" LEMMA="że" POS="comp">że</W>
  57 + <W ID="W38" LEMMA="z" POS="prep:gen:nwok">z</W>
  58 + <W ID="W39" LEMMA="woda" POS="subst:sg:gen:f">wody</W>
  59 + <W ID="W40" LEMMA="wyskoczyć" POS="praet:sg:f:perf">wyskoczyła</W>
  60 + <W ID="W41" LEMMA="na" POS="prep:acc">na</W>
  61 + <W ID="W42" LEMMA="brzeg" POS="subst:sg:acc:m3">brzeg</W>
  62 + <W ID="W43" LEMMA="żaba" POS="subst:sg:nom:f">żaba</W>
  63 + </CLAUSE>
  64 + <CLAUSE ID="CLAUSE7">
  65 + <W ID="W44" LEMMA="i" POS="conj">i</W>
  66 + <W ID="W45" LEMMA="w" POS="prep:acc:nwok">w</W>
  67 + <W ID="W46" LEMMA="ten" POS="adj:pl:acc:n:pos">te</W>
  68 + <W ID="W47" LEMMA="słowo" POS="subst:pl:acc:n">słowa</W>
  69 + <W ID="W48" LEMMA="do" POS="prep:gen">do</W>
  70 + <W ID="W49" LEMMA="on" POS="ppron3:sg:gen:f:ter:akc:praep">niej</W>
  71 + <W ID="W50" LEMMA="przemówić" POS="praet:sg:f:perf">przemówiła</W>
  72 + <W ID="W51" LEMMA=":" POS="interp">:</W>
  73 + </CLAUSE>
  74 + <CLAUSE ID="CLAUSE8">
  75 + <W ID="W52" LEMMA="-" POS="interp">-</W>
  76 + <W ID="W53" LEMMA="twój" POS="adj:sg:nom:n:pos">Twoje</W>
  77 + <W ID="W54" LEMMA="pragnienie" POS="subst:sg:nom:n">pragnienie</W>
  78 + <W ID="W55" LEMMA="spełnić" POS="fin:sg:ter:perf">spełni</W>
  79 + <W ID="W56" LEMMA="się" POS="qub">się</W>
  80 + <W ID="W57" LEMMA="," POS="interp">,</W>
  81 + </CLAUSE>
  82 + <CLAUSE ID="CLAUSE9">
  83 + <W ID="W58" LEMMA="nim" POS="comp">nim</W>
  84 + <W ID="W59" LEMMA="rok" POS="subst:sg:nom:m3">rok</W>
  85 + <W ID="W60" LEMMA="minąć" POS="fin:sg:ter:perf">minie</W>
  86 + <W ID="W61" LEMMA="," POS="interp">,</W>
  87 + </CLAUSE>
  88 + <CLAUSE ID="CLAUSE10">
  89 + <W ID="W62" LEMMA="wydać" POS="fin:sg:sec:perf">wydasz</W>
  90 + <W ID="W63" LEMMA="na" POS="prep:acc">na</W>
  91 + <W ID="W64" LEMMA="świat" POS="subst:sg:acc:m3">świat</W>
  92 + <W ID="W65" LEMMA="córeczka" POS="subst:sg:acc:f">córeczkę</W>
  93 + <W ID="W66" LEMMA="." POS="interp">.</W>
  94 + </CLAUSE>
  95 + </S>
  96 + <S ID="S2">
  97 + <CLAUSE ID="CLAUSE11">
  98 + <W ID="W67" LEMMA="i" POS="conj">I</W>
  99 + <W ID="W68" LEMMA="stać" POS="praet:sg:n:perf">stało</W>
  100 + <W ID="W69" LEMMA="się" POS="qub">się</W>
  101 + <W ID="W70" LEMMA="," POS="interp">,</W>
  102 + </CLAUSE>
  103 + <CLAUSE ID="CLAUSE12">
  104 + <W ID="W71" LEMMA="jak" POS="adv">jak</W>
  105 + <W ID="W72" LEMMA="przepowiedzieć" POS="praet:sg:f:perf">przepowiedziała</W>
  106 + <W ID="W73" LEMMA="żaba" POS="subst:sg:nom:f">żaba</W>
  107 + <W ID="W74" LEMMA="," POS="interp">,</W>
  108 + </CLAUSE>
  109 + <CLAUSE ID="CLAUSE13">
  110 + <W ID="W75" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  111 + <W ID="W76" LEMMA="urodzić" POS="praet:sg:f:perf">urodziła</W>
  112 + <W ID="W77" LEMMA="dziewczynka" POS="subst:sg:acc:f">dziewczynkę</W>
  113 + <W ID="W78" LEMMA="tak" POS="adv:pos">tak</W>
  114 + <W ID="W79" LEMMA="urodziwy" POS="adj:sg:acc:f:pos">urodziwą</W>
  115 + <W ID="W80" LEMMA="," POS="interp">,</W>
  116 + </CLAUSE>
  117 + <CLAUSE ID="CLAUSE14">
  118 + <W ID="W81" LEMMA="że" POS="comp">że</W>
  119 + <W ID="W82" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  120 + <W ID="W83" LEMMA="nie" POS="qub">nie</W>
  121 + <W ID="W84" LEMMA="posiadać" POS="praet:sg:m1:imperf">posiadał</W>
  122 + <W ID="W85" LEMMA="się" POS="qub">się</W>
  123 + <W ID="W86" LEMMA="z" POS="prep:gen:nwok">z</W>
  124 + <W ID="W87" LEMMA="radość" POS="subst:sg:gen:f">radości</W>
  125 + </CLAUSE>
  126 + <CLAUSE ID="CLAUSE15">
  127 + <W ID="W88" LEMMA="i" POS="conj">i</W>
  128 + <W ID="W89" LEMMA="wydać" POS="praet:sg:m1:perf">wydał</W>
  129 + <W ID="W90" LEMMA="wspaniały" POS="adj:sg:acc:f:pos">wspaniałą</W>
  130 + <W ID="W91" LEMMA="uczta" POS="subst:sg:acc:f">ucztę</W>
  131 + <W ID="W92" LEMMA="." POS="interp">.</W>
  132 + </CLAUSE>
  133 + </S>
  134 + <S ID="S3">
  135 + <CLAUSE ID="CLAUSE16">
  136 + <W ID="W93" LEMMA="zaprosić" POS="praet:sg:m1:perf">Zaprosił</W>
  137 + <W ID="W94" LEMMA="nie" POS="conj">nie</W>
  138 + <W ID="W95" LEMMA="tylko" POS="conj">tylko</W>
  139 + <W ID="W96" LEMMA="krewny" POS="subst:pl:gen:m1">krewnych</W>
  140 + <W ID="W97" LEMMA="," POS="interp">,</W>
  141 + <W ID="W98" LEMMA="przyjaciel" POS="subst:pl:gen:m1">przyjaciół</W>
  142 + <W ID="W99" LEMMA="i" POS="conj">i</W>
  143 + <W ID="W100" LEMMA="znajomy" POS="subst:pl:gen:m1">znajomych</W>
  144 + <W ID="W101" LEMMA="," POS="interp">,</W>
  145 + <W ID="W102" LEMMA="ale" POS="conj">ale</W>
  146 + <W ID="W103" LEMMA="również" POS="qub">również</W>
  147 + <W ID="W104" LEMMA="wróżka" POS="subst:pl:nom:f">wróżki</W>
  148 + <W ID="W105" LEMMA="," POS="interp">,</W>
  149 + </CLAUSE>
  150 + <CLAUSE ID="CLAUSE17">
  151 + <W ID="W106" LEMMA="aby" POS="comp">aby</W>
  152 + <W ID="W107" LEMMA="sprzyjać" POS="praet:pl:f:imperf">sprzyjały</W>
  153 + <W ID="W108" LEMMA="dziecki" POS="adjp">dziecku</W>
  154 + </CLAUSE>
  155 + <CLAUSE ID="CLAUSE18">
  156 + <W ID="W109" LEMMA="i" POS="conj">i</W>
  157 + <W ID="W110" LEMMA="otaczać" POS="praet:pl:m3:imperf">otaczały</W>
  158 + <W ID="W111" LEMMA="on" POS="ppron3:pl:acc:m3:ter:akc:npraep">je</W>
  159 + <W ID="W112" LEMMA="opieka" POS="subst:sg:inst:f">opieką</W>
  160 + <W ID="W113" LEMMA="." POS="interp">.</W>
  161 + </CLAUSE>
  162 + </S>
  163 + <S ID="S4">
  164 + <CLAUSE ID="CLAUSE19">
  165 + <W ID="W114" LEMMA="być" POS="praet:sg:n:imperf">Było</W>
  166 + <W ID="W115" LEMMA="on" POS="ppron3:pl:gen:m2:ter:akc:npraep">ich</W>
  167 + <W ID="W116" LEMMA="trzynaście" POS="num:pl:nom:m3:rec">trzynaście</W>
  168 + <W ID="W117" LEMMA="w" POS="prep:loc:nwok">w</W>
  169 + <W ID="W118" LEMMA="cały" POS="adj:sg:loc:n:pos">całym</W>
  170 + <W ID="W119" LEMMA="królestwo" POS="subst:sg:loc:n">królestwie</W>
  171 + <W ID="W120" LEMMA="," POS="interp">,</W>
  172 + </CLAUSE>
  173 + <CLAUSE ID="CLAUSE20">
  174 + <W ID="W121" LEMMA="ale" POS="conj">ale</W>
  175 + <W ID="W122" LEMMA="że" POS="comp">że</W>
  176 + <W ID="W123" LEMMA="w" POS="prep:loc:nwok">w</W>
  177 + <W ID="W124" LEMMA="pałac" POS="subst:sg:loc:m3">pałacu</W>
  178 + <W ID="W125" LEMMA="posiadać" POS="imps:perf">posiadano</W>
  179 + <W ID="W126" LEMMA="tylko" POS="qub">tylko</W>
  180 + <W ID="W127" LEMMA="dwanaście" POS="num:pl:acc:m3:rec">dwanaście</W>
  181 + <W ID="W128" LEMMA="złoty" POS="adj:pl:gen:m3:pos">złotych</W>
  182 + <W ID="W129" LEMMA="talerz" POS="subst:pl:gen:m3">talerzy</W>
  183 + <W ID="W130" LEMMA="," POS="interp">,</W>
  184 + </CLAUSE>
  185 + <CLAUSE ID="CLAUSE21">
  186 + <W ID="W131" LEMMA="na" POS="prep:loc">na</W>
  187 + <W ID="W132" LEMMA="który" POS="adj:pl:loc:f:pos">których</W>
  188 + <W ID="W133" LEMMA="mieć" POS="praet:pl:f:imperf">miały</W>
  189 + <W ID="W134" LEMMA="jeść" POS="inf:imperf">jeść</W>
  190 + <W ID="W135" LEMMA="," POS="interp">,</W>
  191 + </CLAUSE>
  192 + <CLAUSE ID="CLAUSE22" CONTINUE="CLAUSE20">
  193 + <W ID="W136" LEMMA="jeden" POS="adj:sg:nom:f:pos">jedna</W>
  194 + <W ID="W137" LEMMA="z" POS="prep:gen:nwok">z</W>
  195 + <W ID="W138" LEMMA="on" POS="ppron3:pl:gen:f:ter:akc:praep">nich</W>
  196 + <W ID="W139" LEMMA="musieć" POS="praet:sg:f:imperf">musiała</W>
  197 + <W ID="W140" LEMMA="zostać" POS="inf:perf">zostać</W>
  198 + <W ID="W141" LEMMA="w" POS="prep:loc:nwok">w</W>
  199 + <W ID="W142" LEMMA="dom" POS="subst:sg:loc:m3">domu</W>
  200 + <W ID="W143" LEMMA="." POS="interp">.</W>
  201 + </CLAUSE>
  202 + </S>
  203 + <S ID="S5">
  204 + <CLAUSE ID="CLAUSE23">
  205 + <W ID="W144" LEMMA="po" POS="prep:loc">Po</W>
  206 + <W ID="W145" LEMMA="niezwykle" POS="adv:pos">niezwykle</W>
  207 + <W ID="W146" LEMMA="wystawny" POS="adj:sg:loc:f:pos">wystawnej</W>
  208 + <W ID="W147" LEMMA="uczta" POS="subst:sg:loc:f">uczcie</W>
  209 + <W ID="W148" LEMMA="wróżka" POS="subst:sg:gen:f">wróżki</W>
  210 + <W ID="W149" LEMMA="począć" POS="praet:pl:m2:perf">poczęły</W>
  211 + <W ID="W150" LEMMA="składać" POS="inf:imperf">składać</W>
  212 + <W ID="W151" LEMMA="noworodek" POS="subst:sg:dat:m2">noworodkowi</W>
  213 + <W ID="W152" LEMMA="dar" POS="subst:pl:acc:m3">dary</W>
  214 + <W ID="W153" LEMMA=":" POS="interp">:</W>
  215 + </CLAUSE>
  216 + <CLAUSE ID="CLAUSE24">
  217 + <W ID="W154" LEMMA="jeden" POS="adj:sg:nom:f:pos">jedna</W>
  218 + <W ID="W155" LEMMA="obdarzyć" POS="praet:sg:f:perf">obdarzyła</W>
  219 + <W ID="W156" LEMMA="królewna" POS="subst:sg:acc:f">królewnę</W>
  220 + <W ID="W157" LEMMA="cnota" POS="subst:pl:inst:f">cnotami</W>
  221 + <W ID="W158" LEMMA="," POS="interp">,</W>
  222 + <W ID="W159" LEMMA="drugi" POS="adj:sg:nom:f:pos">druga</W>
  223 + <W ID="W160" LEMMA="uroda" POS="subst:sg:inst:f">urodą</W>
  224 + <W ID="W161" LEMMA="," POS="interp">,</W>
  225 + <W ID="W162" LEMMA="trzeci" POS="adj:sg:nom:f:pos">trzecia</W>
  226 + <W ID="W163" LEMMA="bogactwo" POS="subst:sg:inst:n">bogactwem</W>
  227 + <W ID="W164" LEMMA="," POS="interp">,</W>
  228 + </CLAUSE>
  229 + <CLAUSE ID="CLAUSE25" CONTINUE="CLAUSE23">
  230 + <W ID="W165" LEMMA="tak" POS="adv:pos">tak</W>
  231 + <W ID="W166" LEMMA="że" POS="comp">że</W>
  232 + <W ID="W167" LEMMA="w" POS="prep:loc:nwok">w</W>
  233 + <W ID="W168" LEMMA="koniec" POS="subst:sg:loc:m3">końcu</W>
  234 + <W ID="W169" LEMMA="otrzymać" POS="praet:sg:f:perf">otrzymała</W>
  235 + <W ID="W170" LEMMA="on" POS="ppron3:sg:nom:f:ter:akc:npraep">ona</W>
  236 + <W ID="W171" LEMMA="wszystko" POS="subst:sg:acc:n">wszystko</W>
  237 + <W ID="W172" LEMMA="," POS="interp">,</W>
  238 + </CLAUSE>
  239 + <CLAUSE ID="CLAUSE26">
  240 + <W ID="W173" LEMMA="co" POS="subst:sg:acc:n">co</W>
  241 + <W ID="W174" LEMMA="tylko" POS="qub">tylko</W>
  242 + <W ID="W175" LEMMA="można" POS="pred">można</W>
  243 + <W ID="W176" LEMMA="się" POS="siebie:dat">sobie</W>
  244 + <W ID="W177" LEMMA="wymarzyć" POS="inf:perf">wymarzyć</W>
  245 + <W ID="W178" LEMMA="na" POS="prep:loc">na</W>
  246 + <W ID="W179" LEMMA="ten" POS="adj:sg:loc:m3:pos">tym</W>
  247 + <W ID="W180" LEMMA="świat" POS="subst:sg:loc:m3">świecie</W>
  248 + <W ID="W181" LEMMA="." POS="interp">.</W>
  249 + </CLAUSE>
  250 + </S>
  251 + <S ID="S6">
  252 + <CLAUSE ID="CLAUSE27">
  253 + <W ID="W182" LEMMA="kiedy" POS="adv">Kiedy</W>
  254 + <W ID="W183" LEMMA="jedenaście" POS="num:pl:nom:f:rec">jedenaście</W>
  255 + <W ID="W184" LEMMA="wróżka" POS="subst:pl:gen:f">wróżek</W>
  256 + <W ID="W185" LEMMA="poczynić" POS="praet:sg:n:perf">poczyniło</W>
  257 + <W ID="W186" LEMMA="już" POS="qub">już</W>
  258 + <W ID="W187" LEMMA="swój" POS="adj:pl:acc:n:pos">swoje</W>
  259 + <W ID="W188" LEMMA="zaklęcie" POS="subst:pl:acc:n">zaklęcia</W>
  260 + <W ID="W189" LEMMA="," POS="interp">,</W>
  261 + </CLAUSE>
  262 + <CLAUSE ID="CLAUSE28">
  263 + <W ID="W190" LEMMA="wkroczyć" POS="praet:sg:f:perf">wkroczyła</W>
  264 + <W ID="W191" LEMMA="nagle" POS="adv:pos">nagle</W>
  265 + <W ID="W192" LEMMA="do" POS="prep:gen">do</W>
  266 + <W ID="W193" LEMMA="komnata" POS="subst:sg:gen:f">komnaty</W>
  267 + <W ID="W194" LEMMA="trzynasta" POS="subst:sg:nom:f">trzynasta</W>
  268 + <W ID="W195" LEMMA="." POS="interp">.</W>
  269 + </CLAUSE>
  270 + </S>
  271 + <S ID="S7">
  272 + <CLAUSE ID="CLAUSE29">
  273 + <W ID="W196" LEMMA="chcieć" POS="praet:sg:f:imperf">Chciała</W>
  274 + <W ID="W197" LEMMA="się" POS="qub">się</W>
  275 + <W ID="W198" LEMMA="zemścić" POS="inf:perf">zemścić</W>
  276 + <W ID="W199" LEMMA="za" POS="prep:acc">za</W>
  277 + <W ID="W200" LEMMA="to" POS="subst:sg:acc:n">to</W>
  278 + <W ID="W201" LEMMA="," POS="interp">,</W>
  279 + </CLAUSE>
  280 + <CLAUSE ID="CLAUSE30">
  281 + <W ID="W202" LEMMA="że" POS="comp">że</W>
  282 + <W ID="W203" LEMMA="nie" POS="qub">nie</W>
  283 + <W ID="W204" LEMMA="zostać" POS="praet:sg:f:perf">została</W>
  284 + <W ID="W205" LEMMA="zaprosić" POS="ppas:sg:nom:f:perf:aff">zaproszona</W>
  285 + <W ID="W206" LEMMA="," POS="interp">,</W>
  286 + </CLAUSE>
  287 + <CLAUSE ID="CLAUSE31">
  288 + <W ID="W207" LEMMA="i" POS="conj">i</W>
  289 + <W ID="W208" LEMMA="nie" POS="qub">nie</W>
  290 + <W ID="W209" LEMMA="witać" POS="pcon:imperf">witając</W>
  291 + <W ID="W210" LEMMA="się" POS="qub">się</W>
  292 + <W ID="W211" LEMMA="z" POS="prep:inst:nwok">z</W>
  293 + <W ID="W212" LEMMA="nikt" POS="subst:sg:inst:m1">nikim</W>
  294 + <W ID="W213" LEMMA="ani" POS="conj">ani</W>
  295 + <W ID="W214" LEMMA="na" POS="prep:acc">na</W>
  296 + <W ID="W215" LEMMA="nikt" POS="subst:sg:acc:m1">nikogo</W>
  297 + <W ID="W216" LEMMA="nie" POS="qub">nie</W>
  298 + <W ID="W217" LEMMA="patrzyć" POS="pcon:imperf">patrząc</W>
  299 + <W ID="W218" LEMMA="," POS="interp">,</W>
  300 + <W ID="W219" LEMMA="zawołać" POS="praet:sg:f:perf">zawołała</W>
  301 + <W ID="W220" LEMMA="na" POS="prep:acc">na</W>
  302 + <W ID="W221" LEMMA="cały" POS="adj:sg:acc:m3:pos">cały</W>
  303 + <W ID="W222" LEMMA="głos" POS="subst:sg:acc:m3">głos</W>
  304 + <W ID="W223" LEMMA=":" POS="interp">:</W>
  305 + </CLAUSE>
  306 + <CLAUSE ID="CLAUSE32">
  307 + <W ID="W224" LEMMA="-" POS="interp">-</W>
  308 + <W ID="W225" LEMMA="niechaj" POS="qub">Niechaj</W>
  309 + <W ID="W226" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  310 + <W ID="W227" LEMMA="w" POS="prep:loc:nwok">w</W>
  311 + <W ID="W228" LEMMA="piętnasty" POS="adj:sg:loc:m3:pos">piętnastym</W>
  312 + <W ID="W229" LEMMA="rok" POS="subst:sg:loc:m3">roku</W>
  313 + <W ID="W230" LEMMA="życie" POS="subst:sg:gen:n">życia</W>
  314 + <W ID="W231" LEMMA="ukłuć" POS="fin:sg:ter:perf">ukłuje</W>
  315 + <W ID="W232" LEMMA="się" POS="qub">się</W>
  316 + <W ID="W233" LEMMA="wrzeciono" POS="subst:sg:inst:n">wrzecionem</W>
  317 + </CLAUSE>
  318 + <CLAUSE ID="CLAUSE33">
  319 + <W ID="W234" LEMMA="i" POS="conj">i</W>
  320 + <W ID="W235" LEMMA="umrzeć" POS="fin:sg:ter:perf">umrze</W>
  321 + <W ID="W236" LEMMA="." POS="interp">.</W>
  322 + </CLAUSE>
  323 + </S>
  324 + <S ID="S8">
  325 + <CLAUSE ID="CLAUSE34">
  326 + <W ID="W237" LEMMA="powiedzieć" POS="pant:perf">Powiedziawszy</W>
  327 + <W ID="W238" LEMMA="to" POS="pred">to</W>
  328 + <W ID="W239" LEMMA="zawrócić" POS="praet:sg:f:perf">zawróciła</W>
  329 + </CLAUSE>
  330 + <CLAUSE ID="CLAUSE35">
  331 + <W ID="W240" LEMMA="i" POS="conj">i</W>
  332 + <W ID="W241" LEMMA="opuścić" POS="praet:sg:f:perf">opuściła</W>
  333 + <W ID="W242" LEMMA="sala" POS="subst:sg:acc:f">salę</W>
  334 + <W ID="W243" LEMMA="." POS="interp">.</W>
  335 + </CLAUSE>
  336 + </S>
  337 + <S ID="S9">
  338 + <CLAUSE ID="CLAUSE36">
  339 + <W ID="W244" LEMMA="wszystek" POS="adj:pl:nom:m1:pos">Wszyscy</W>
  340 + <W ID="W245" LEMMA="obecny" POS="adj:pl:nom:m1:pos">obecni</W>
  341 + <W ID="W246" LEMMA="stać" POS="praet:pl:m1:imperf">stali</W>
  342 + <W ID="W247" LEMMA="przerażony" POS="adj:pl:nom:m1:pos">przerażeni</W>
  343 + <W ID="W248" LEMMA="," POS="interp">,</W>
  344 + </CLAUSE>
  345 + <CLAUSE ID="CLAUSE37">
  346 + <W ID="W249" LEMMA="wtedy" POS="adv">wtedy</W>
  347 + <W ID="W250" LEMMA="wystąpić" POS="praet:sg:f:perf">wystąpiła</W>
  348 + <W ID="W251" LEMMA="dwunasty" POS="adj:sg:nom:f:pos">dwunasta</W>
  349 + <W ID="W252" LEMMA="wróżka" POS="subst:sg:nom:f">wróżka</W>
  350 + <W ID="W253" LEMMA="," POS="interp">,</W>
  351 + </CLAUSE>
  352 + <CLAUSE ID="CLAUSE38">
  353 + <W ID="W254" LEMMA="który" POS="adj:sg:nom:f:pos">która</W>
  354 + <W ID="W255" LEMMA="nie" POS="qub">nie</W>
  355 + <W ID="W256" LEMMA="wymienić" POS="praet:sg:f:perf">wymieniła</W>
  356 + <W ID="W257" LEMMA="jeszcze" POS="qub">jeszcze</W>
  357 + <W ID="W258" LEMMA="swój" POS="adj:sg:gen:n:pos">swego</W>
  358 + <W ID="W259" LEMMA="życzenie" POS="subst:sg:gen:n">życzenia</W>
  359 + <W ID="W260" LEMMA="," POS="interp">,</W>
  360 + </CLAUSE>
  361 + <CLAUSE ID="CLAUSE39">
  362 + <W ID="W261" LEMMA="a" POS="conj">a</W>
  363 + <W ID="W262" LEMMA="że" POS="comp">że</W>
  364 + <W ID="W263" LEMMA="nie" POS="qub">nie</W>
  365 + <W ID="W264" LEMMA="móc" POS="praet:sg:f:imperf">mogła</W>
  366 + <W ID="W265" LEMMA="odwrócić" POS="inf:perf">odwrócić</W>
  367 + <W ID="W266" LEMMA="złowrogi" POS="adj:sg:gen:n:pos">złowrogiego</W>
  368 + <W ID="W267" LEMMA="zaklęcie" POS="subst:sg:gen:n">zaklęcia</W>
  369 + <W ID="W268" LEMMA="," POS="interp">,</W>
  370 + <W ID="W269" LEMMA="tylko" POS="qub">tylko</W>
  371 + <W ID="W270" LEMMA="on" POS="ppron3:pl:acc:n:ter:akc:npraep">je</W>
  372 + <W ID="W271" LEMMA="złagodzić" POS="inf:perf">złagodzić</W>
  373 + <W ID="W272" LEMMA="," POS="interp">,</W>
  374 + </CLAUSE>
  375 + <CLAUSE ID="CLAUSE40" CONTINUE="CLAUSE37">
  376 + <W ID="W273" LEMMA="rzec" POS="praet:sg:f:perf">rzekła</W>
  377 + <W ID="W274" LEMMA=":" POS="interp">:</W>
  378 + </CLAUSE>
  379 + <CLAUSE ID="CLAUSE41">
  380 + <W ID="W275" LEMMA="-" POS="interp">-</W>
  381 + <W ID="W276" LEMMA="niech" POS="qub">Niech</W>
  382 + <W ID="W277" LEMMA="to" POS="pred">to</W>
  383 + <W ID="W278" LEMMA="nie" POS="qub">nie</W>
  384 + <W ID="W279" LEMMA="być" POS="bedzie:sg:ter:imperf">będzie</W>
  385 + <W ID="W280" LEMMA="śmierć" POS="subst:sg:nom:f">śmierć</W>
  386 + <W ID="W281" LEMMA="," POS="interp">,</W>
  387 + </CLAUSE>
  388 + <CLAUSE ID="CLAUSE42">
  389 + <W ID="W282" LEMMA="lecz" POS="conj">lecz</W>
  390 + <W ID="W283" LEMMA="stuletni" POS="adj:sg:nom:m3:pos">stuletni</W>
  391 + <W ID="W284" LEMMA="głęboki" POS="adj:sg:nom:m3:pos">głęboki</W>
  392 + <W ID="W285" LEMMA="sen" POS="subst:sg:nom:m3">sen</W>
  393 + <W ID="W286" LEMMA="," POS="interp">,</W>
  394 + </CLAUSE>
  395 + <CLAUSE ID="CLAUSE43">
  396 + <W ID="W287" LEMMA="w" POS="prep:acc:nwok">w</W>
  397 + <W ID="W288" LEMMA="jaki" POS="adj:sg:nom:m3:pos">jaki</W>
  398 + <W ID="W289" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  399 + <W ID="W290" LEMMA="zapaść" POS="fin:sg:ter:perf">zapadnie</W>
  400 + <W ID="W291" LEMMA="." POS="interp">.</W>
  401 + </CLAUSE>
  402 + </S>
  403 + <S ID="S10">
  404 + <CLAUSE ID="CLAUSE44">
  405 + <W ID="W292" LEMMA="król" POS="subst:sg:nom:m1">Król</W>
  406 + <W ID="W293" LEMMA="," POS="interp">,</W>
  407 + </CLAUSE>
  408 + <CLAUSE ID="CLAUSE45">
  409 + <W ID="W294" LEMMA="który" POS="adj:sg:nom:m1:pos">który</W>
  410 + <W ID="W295" LEMMA="pragnąć" POS="praet:sg:m1:imperf">pragnął</W>
  411 + <W ID="W296" LEMMA="uchronić" POS="inf:perf">uchronić</W>
  412 + <W ID="W297" LEMMA="ukochany" POS="adj:sg:acc:n:pos">ukochane</W>
  413 + <W ID="W298" LEMMA="dziecko" POS="subst:sg:acc:n">dziecko</W>
  414 + <W ID="W299" LEMMA="przed" POS="prep:inst:nwok">przed</W>
  415 + <W ID="W300" LEMMA="nieszczęście" POS="subst:sg:inst:n">nieszczęściem</W>
  416 + <W ID="W301" LEMMA="," POS="interp">,</W>
  417 + </CLAUSE>
  418 + <CLAUSE ID="CLAUSE46" CONTINUE="CLAUSE44">
  419 + <W ID="W302" LEMMA="wydać" POS="praet:sg:m1:perf">wydał</W>
  420 + <W ID="W303" LEMMA="rozkaz" POS="subst:sg:acc:m3">rozkaz</W>
  421 + <W ID="W304" LEMMA="," POS="interp">,</W>
  422 + </CLAUSE>
  423 + <CLAUSE ID="CLAUSE47">
  424 + <W ID="W305" LEMMA="aby" POS="comp">aby</W>
  425 + <W ID="W306" LEMMA="wszystek" POS="adj:pl:nom:n:pos">wszystkie</W>
  426 + <W ID="W307" LEMMA="wrzeciono" POS="subst:pl:nom:n">wrzeciona</W>
  427 + <W ID="W308" LEMMA="w" POS="prep:loc:nwok">w</W>
  428 + <W ID="W309" LEMMA="cały" POS="adj:sg:loc:m3:pos">całym</W>
  429 + <W ID="W310" LEMMA="on" POS="ppron3:sg:gen:m1:ter:akc:npraep">jego</W>
  430 + <W ID="W311" LEMMA="państwo" POS="subst:sg:loc:n">państwie</W>
  431 + <W ID="W312" LEMMA="zostać" POS="praet:pl:m3:perf">zostały</W>
  432 + <W ID="W313" LEMMA="spalony" POS="subst:pl:acc:m3">spalone</W>
  433 + <W ID="W314" LEMMA="." POS="interp">.</W>
  434 + </CLAUSE>
  435 + </S>
  436 + <S ID="S11">
  437 + <CLAUSE ID="CLAUSE48">
  438 + <W ID="W315" LEMMA="dar" POS="subst:pl:nom:m3">Dary</W>
  439 + <W ID="W316" LEMMA="," POS="interp">,</W>
  440 + </CLAUSE>
  441 + <CLAUSE ID="CLAUSE49">
  442 + <W ID="W317" LEMMA="jaki" POS="adj:pl:inst:f:pos">jakimi</W>
  443 + <W ID="W318" LEMMA="wróżka" POS="subst:sg:gen:f">wróżki</W>
  444 + <W ID="W319" LEMMA="obsypać" POS="praet:pl:f:perf">obsypały</W>
  445 + <W ID="W320" LEMMA="dzieweczka" POS="subst:sg:acc:f">dzieweczkę</W>
  446 + <W ID="W321" LEMMA="," POS="interp">,</W>
  447 + </CLAUSE>
  448 + <CLAUSE ID="CLAUSE50" CONTINUE="CLAUSE48">
  449 + <W ID="W322" LEMMA="spełnić" POS="praet:pl:f:perf">spełniły</W>
  450 + <W ID="W323" LEMMA="się" POS="qub">się</W>
  451 + <W ID="W324" LEMMA="co" POS="comp">co</W>
  452 + <W ID="W325" LEMMA="do" POS="prep:gen">do</W>
  453 + <W ID="W326" LEMMA="jota" POS="subst:sg:gen:f">joty</W>
  454 + <W ID="W327" LEMMA=":" POS="interp">:</W>
  455 + </CLAUSE>
  456 + <CLAUSE ID="CLAUSE51">
  457 + <W ID="W328" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  458 + <W ID="W329" LEMMA="być" POS="praet:sg:f:imperf">była</W>
  459 + <W ID="W330" LEMMA="taki" POS="adj:sg:nom:f:pos">taka</W>
  460 + <W ID="W331" LEMMA="śliczny" POS="adj:sg:nom:f:pos">śliczna</W>
  461 + <W ID="W332" LEMMA="," POS="interp">,</W>
  462 + <W ID="W333" LEMMA="cnotliwy" POS="adj:sg:nom:f:pos">cnotliwa</W>
  463 + <W ID="W334" LEMMA="," POS="interp">,</W>
  464 + <W ID="W335" LEMMA="milutki" POS="adj:sg:nom:f:pos">milutka</W>
  465 + <W ID="W336" LEMMA="i" POS="conj">i</W>
  466 + <W ID="W337" LEMMA="roztropny" POS="adj:sg:nom:f:pos">roztropna</W>
  467 + <W ID="W338" LEMMA="," POS="interp">,</W>
  468 + </CLAUSE>
  469 + <CLAUSE ID="CLAUSE52">
  470 + <W ID="W339" LEMMA="że" POS="comp">że</W>
  471 + <W ID="W340" LEMMA="wystarczyć" POS="praet:sg:n:perf">wystarczyło</W>
  472 + <W ID="W341" LEMMA="na" POS="prep:acc">na</W>
  473 + <W ID="W342" LEMMA="on" POS="ppron3:sg:acc:f:ter:akc:praep">nią</W>
  474 + <W ID="W343" LEMMA="spojrzeć" POS="inf:perf">spojrzeć</W>
  475 + <W ID="W344" LEMMA="," POS="interp">,</W>
  476 + <W ID="W345" LEMMA="by" POS="comp">by</W>
  477 + <W ID="W346" LEMMA="on" POS="ppron3:sg:acc:f:ter:akc:npraep">ją</W>
  478 + <W ID="W347" LEMMA="pokochać" POS="inf:perf">pokochać</W>
  479 + <W ID="W348" LEMMA="." POS="interp">.</W>
  480 + </CLAUSE>
  481 + </S>
  482 + <S ID="S12">
  483 + <CLAUSE ID="CLAUSE53">
  484 + <W ID="W349" LEMMA="tak" POS="adv:pos">Tak</W>
  485 + <W ID="W350" LEMMA="się" POS="qub">się</W>
  486 + <W ID="W351" LEMMA="złożyć" POS="praet:sg:n:perf">złożyło</W>
  487 + <W ID="W352" LEMMA="," POS="interp">,</W>
  488 + </CLAUSE>
  489 + <CLAUSE ID="CLAUSE54">
  490 + <W ID="W353" LEMMA="że" POS="comp">że</W>
  491 + <W ID="W354" LEMMA="w" POS="prep:loc:nwok">w</W>
  492 + <W ID="W355" LEMMA="dzień" POS="subst:sg:loc:m3">dniu</W>
  493 + <W ID="W356" LEMMA="," POS="interp">,</W>
  494 + </CLAUSE>
  495 + <CLAUSE ID="CLAUSE55">
  496 + <W ID="W357" LEMMA="kiedy" POS="adv">kiedy</W>
  497 + <W ID="W358" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  498 + <W ID="W359" LEMMA="kończyć" POS="praet:sg:f:imperf">kończyła</W>
  499 + <W ID="W360" LEMMA="piętnaście" POS="num:pl:acc:m3:rec">piętnaście</W>
  500 + <W ID="W361" LEMMA="rok" POS="subst:pl:gen:m3">lat</W>
  501 + <W ID="W362" LEMMA="," POS="interp">,</W>
  502 + </CLAUSE>
  503 + <CLAUSE ID="CLAUSE56">
  504 + <W ID="W363" LEMMA="ani" POS="conj">ani</W>
  505 + <W ID="W364" LEMMA="król" POS="subst:sg:gen:m1">króla</W>
  506 + <W ID="W365" LEMMA="," POS="interp">,</W>
  507 + <W ID="W366" LEMMA="ani" POS="conj">ani</W>
  508 + <W ID="W367" LEMMA="królowa" POS="subst:sg:gen:f">królowej</W>
  509 + <W ID="W368" LEMMA="nie" POS="qub">nie</W>
  510 + <W ID="W369" LEMMA="być" POS="praet:sg:n:imperf">było</W>
  511 + <W ID="W370" LEMMA="w" POS="prep:loc:nwok">w</W>
  512 + <W ID="W371" LEMMA="dom" POS="subst:sg:loc:m3">domu</W>
  513 + </CLAUSE>
  514 + <CLAUSE ID="CLAUSE57">
  515 + <W ID="W372" LEMMA="i" POS="conj">i</W>
  516 + <W ID="W373" LEMMA="dziewczynka" POS="subst:sg:nom:f">dziewczynka</W>
  517 + <W ID="W374" LEMMA="zostać" POS="praet:sg:f:perf">została</W>
  518 + <W ID="W375" LEMMA="w" POS="prep:loc:nwok">w</W>
  519 + <W ID="W376" LEMMA="pałac" POS="subst:sg:loc:m3">pałacu</W>
  520 + <W ID="W377" LEMMA="zupełnie" POS="adv:pos">zupełnie</W>
  521 + <W ID="W378" LEMMA="sam" POS="adj:sg:nom:f:pos">sama</W>
  522 + <W ID="W379" LEMMA="." POS="interp">.</W>
  523 + </CLAUSE>
  524 + </S>
  525 + <S ID="S13">
  526 + <CLAUSE ID="CLAUSE58">
  527 + <W ID="W380" LEMMA="chodzić" POS="praet:sg:f:imperf">Chodziła</W>
  528 + <W ID="W381" LEMMA="się" POS="siebie:dat">sobie</W>
  529 + <W ID="W382" LEMMA="po" POS="prep:loc">po</W>
  530 + <W ID="W383" LEMMA="cały" POS="adj:sg:loc:m3:pos">całym</W>
  531 + <W ID="W384" LEMMA="gmach" POS="subst:sg:loc:m3">gmachu</W>
  532 + <W ID="W385" LEMMA="," POS="interp">,</W>
  533 + </CLAUSE>
  534 + <CLAUSE ID="CLAUSE59">
  535 + <W ID="W386" LEMMA="zaglądać" POS="praet:sg:f:imperf">zaglądała</W>
  536 + <W ID="W387" LEMMA="swobodnie" POS="adv:pos">swobodnie</W>
  537 + <W ID="W388" LEMMA="do" POS="prep:gen">do</W>
  538 + <W ID="W389" LEMMA="wszystek" POS="adj:pl:gen:f:pos">wszystkich</W>
  539 + <W ID="W390" LEMMA="komnata" POS="subst:pl:gen:f">komnat</W>
  540 + <W ID="W391" LEMMA="i" POS="conj">i</W>
  541 + <W ID="W392" LEMMA="pokój" POS="subst:pl:gen:m3">pokoi</W>
  542 + <W ID="W393" LEMMA="," POS="interp">,</W>
  543 + </CLAUSE>
  544 + <CLAUSE ID="CLAUSE60">
  545 + <W ID="W394" LEMMA="aż" POS="comp">aż</W>
  546 + <W ID="W395" LEMMA="stanąć" POS="praet:sg:f:perf">stanęła</W>
  547 + <W ID="W396" LEMMA="u" POS="prep:gen">u</W>
  548 + <W ID="W397" LEMMA="stopa" POS="subst:pl:gen:f">stóp</W>
  549 + <W ID="W398" LEMMA="stary" POS="adj:sg:gen:f:pos">starej</W>
  550 + <W ID="W399" LEMMA="wieża" POS="subst:sg:gen:f">wieży</W>
  551 + <W ID="W400" LEMMA="." POS="interp">.</W>
  552 + </CLAUSE>
  553 + </S>
  554 + <S ID="S14">
  555 + <CLAUSE ID="CLAUSE61">
  556 + <W ID="W401" LEMMA="wspiąć" POS="praet:sg:f:perf">Wspięła</W>
  557 + <W ID="W402" LEMMA="się" POS="qub">się</W>
  558 + <W ID="W403" LEMMA="po" POS="prep:loc">po</W>
  559 + <W ID="W404" LEMMA="kręcić" POS="ppas:pl:loc:n:imperf:aff">kręconych</W>
  560 + <W ID="W405" LEMMA="schody" POS="subst:pl:loc:n">schodach</W>
  561 + <W ID="W406" LEMMA="na" POS="prep:acc">na</W>
  562 + <W ID="W407" LEMMA="góra" POS="subst:sg:acc:f">górę</W>
  563 + </CLAUSE>
  564 + <CLAUSE ID="CLAUSE62">
  565 + <W ID="W408" LEMMA="i" POS="conj">i</W>
  566 + <W ID="W409" LEMMA="znaleźć" POS="praet:sg:f:perf">znalazła</W>
  567 + <W ID="W410" LEMMA="się" POS="qub">się</W>
  568 + <W ID="W411" LEMMA="przed" POS="prep:inst:nwok">przed</W>
  569 + <W ID="W412" LEMMA="maleńki" POS="adj:pl:inst:n:pos">maleńkimi</W>
  570 + <W ID="W413" LEMMA="drzwiczki" POS="subst:pl:inst:n">drzwiczkami</W>
  571 + <W ID="W414" LEMMA="." POS="interp">.</W>
  572 + </CLAUSE>
  573 + </S>
  574 + <S ID="S15">
  575 + <CLAUSE ID="CLAUSE63">
  576 + <W ID="W415" LEMMA="w" POS="prep:loc:nwok">W</W>
  577 + <W ID="W416" LEMMA="zamek" POS="subst:sg:loc:m3">zamku</W>
  578 + <W ID="W417" LEMMA="tkwić" POS="praet:sg:m3:imperf">tkwił</W>
  579 + <W ID="W418" LEMMA="zardzewiały" POS="adj:sg:nom:m3:pos">zardzewiały</W>
  580 + <W ID="W419" LEMMA="klucz" POS="subst:sg:nom:m3">klucz</W>
  581 + <W ID="W420" LEMMA="," POS="interp">,</W>
  582 + </CLAUSE>
  583 + <CLAUSE ID="CLAUSE64">
  584 + <W ID="W421" LEMMA="a" POS="conj">a</W>
  585 + <W ID="W422" LEMMA="kiedy" POS="adv">kiedy</W>
  586 + <W ID="W423" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  587 + <W ID="W424" LEMMA="on" POS="ppron3:sg:acc:m1:ter:nakc:npraep">go</W>
  588 + <W ID="W425" LEMMA="przekręcić" POS="praet:sg:f:perf">przekręciła</W>
  589 + <W ID="W426" LEMMA="," POS="interp">,</W>
  590 + </CLAUSE>
  591 + <CLAUSE ID="CLAUSE65">
  592 + <W ID="W427" LEMMA="drzwi" POS="subst:pl:nom:n">drzwi</W>
  593 + <W ID="W428" LEMMA="otworzyć" POS="praet:pl:n:perf">otworzyły</W>
  594 + <W ID="W429" LEMMA="się" POS="qub">się</W>
  595 + <W ID="W430" LEMMA="gwałtownie" POS="adv:pos">gwałtownie</W>
  596 + <W ID="W431" LEMMA="," POS="interp">,</W>
  597 + </CLAUSE>
  598 + <CLAUSE ID="CLAUSE66">
  599 + <W ID="W432" LEMMA="w" POS="prep:loc:nwok">w</W>
  600 + <W ID="W433" LEMMA="izdebka" POS="subst:sg:loc:f">izdebce</W>
  601 + <W ID="W434" LEMMA="zaś" POS="conj">zaś</W>
  602 + <W ID="W435" LEMMA="siedzieć" POS="praet:sg:f:imperf">siedziała</W>
  603 + <W ID="W436" LEMMA="stary" POS="adj:sg:nom:f:pos">stara</W>
  604 + <W ID="W437" LEMMA="kobieta" POS="subst:sg:nom:f">kobieta</W>
  605 + <W ID="W438" LEMMA="z" POS="prep:inst:nwok">z</W>
  606 + <W ID="W439" LEMMA="wrzeciono" POS="subst:sg:inst:n">wrzecionem</W>
  607 + </CLAUSE>
  608 + <CLAUSE ID="CLAUSE67">
  609 + <W ID="W440" LEMMA="i" POS="conj">i</W>
  610 + <W ID="W441" LEMMA="prząść" POS="praet:sg:f:imperf">przędła</W>
  611 + <W ID="W442" LEMMA="pilnie" POS="adv:pos">pilnie</W>
  612 + <W ID="W443" LEMMA="Lena" POS="subst:pl:gen:f">len</W>
  613 + <W ID="W444" LEMMA="." POS="interp">.</W>
  614 + </CLAUSE>
  615 + </S>
  616 + <S ID="S16">
  617 + <CLAUSE ID="CLAUSE68">
  618 + <W ID="W445" LEMMA="-" POS="interp">-</W>
  619 + <W ID="W446" LEMMA="dzień" POS="subst:sg:nom:m3">Dzień</W>
  620 + <W ID="W447" LEMMA="dobry" POS="adj:sg:nom:m3:pos">dobry</W>
  621 + <W ID="W448" LEMMA="," POS="interp">,</W>
  622 + <W ID="W449" LEMMA="babcia" POS="subst:sg:voc:f">babciu</W>
  623 + </CLAUSE>
  624 + <CLAUSE ID="CLAUSE69">
  625 + <W ID="W450" LEMMA="-" POS="interp">-</W>
  626 + <W ID="W451" LEMMA="rzec" POS="praet:sg:f:perf">rzekła</W>
  627 + <W ID="W452" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  628 + </CLAUSE>
  629 + <CLAUSE ID="CLAUSE70">
  630 + <W ID="W453" LEMMA="-" POS="interp">-</W>
  631 + <W ID="W454" LEMMA="co" POS="subst:sg:acc:n">co</W>
  632 + <W ID="W455" LEMMA="ty" POS="ppron12:sg:nom:m1:sec">ty</W>
  633 + <W ID="W456" LEMMA="tu" POS="adv">tu</W>
  634 + <W ID="W457" LEMMA="robić" POS="fin:sg:sec:imperf">robisz</W>
  635 + <W ID="W458" LEMMA="?" POS="interp">?</W>
  636 + </CLAUSE>
  637 + </S>
  638 + <S ID="S17">
  639 + <CLAUSE ID="CLAUSE71">
  640 + <W ID="W459" LEMMA="-" POS="interp">-</W>
  641 + <W ID="W460" LEMMA="prząść" POS="fin:sg:pri:imperf">Przędę</W>
  642 + </CLAUSE>
  643 + <CLAUSE ID="CLAUSE72">
  644 + <W ID="W461" LEMMA="-" POS="interp">-</W>
  645 + <W ID="W462" LEMMA="odeprzeć" POS="praet:sg:f:perf">odparła</W>
  646 + <W ID="W463" LEMMA="staruszka" POS="subst:sg:nom:f">staruszka</W>
  647 + <W ID="W464" LEMMA="," POS="interp">,</W>
  648 + <W ID="W465" LEMMA="kiwać" POS="pcon:imperf">kiwając</W>
  649 + <W ID="W466" LEMMA="głowa" POS="subst:sg:inst:f">głową</W>
  650 + <W ID="W467" LEMMA="." POS="interp">.</W>
  651 + </CLAUSE>
  652 + </S>
  653 + <S ID="S18">
  654 + <CLAUSE ID="CLAUSE73">
  655 + <W ID="W468" LEMMA="-" POS="interp">-</W>
  656 + <W ID="W469" LEMMA="a" POS="conj">A</W>
  657 + <W ID="W470" LEMMA="co" POS="subst:sg:nom:n">co</W>
  658 + <W ID="W471" LEMMA="to" POS="pred">to</W>
  659 + <W ID="W472" LEMMA="tak" POS="adv:pos">tak</W>
  660 + <W ID="W473" LEMMA="śmiesznie" POS="adv:pos">śmiesznie</W>
  661 + <W ID="W474" LEMMA="podskakiwać" POS="fin:sg:ter:imperf">podskakuje</W>
  662 + <W ID="W475" LEMMA="?" POS="interp">?</W>
  663 + </CLAUSE>
  664 + <CLAUSE ID="CLAUSE74">
  665 + <W ID="W476" LEMMA="-" POS="interp">-</W>
  666 + <W ID="W477" LEMMA="spytać" POS="praet:sg:f:perf">spytała</W>
  667 + <W ID="W478" LEMMA="dziewczynka" POS="subst:sg:nom:f">dziewczynka</W>
  668 + <W ID="W479" LEMMA="," POS="interp">,</W>
  669 + </CLAUSE>
  670 + <CLAUSE ID="CLAUSE75">
  671 + <W ID="W480" LEMMA="wziąć" POS="praet:sg:f:perf">wzięła</W>
  672 + <W ID="W481" LEMMA="do" POS="prep:gen">do</W>
  673 + <W ID="W482" LEMMA="ręka" POS="subst:sg:gen:f">ręki</W>
  674 + <W ID="W483" LEMMA="wrzeciono" POS="subst:sg:acc:n">wrzeciono</W>
  675 + </CLAUSE>
  676 + <CLAUSE ID="CLAUSE76">
  677 + <W ID="W484" LEMMA="i" POS="conj">i</W>
  678 + <W ID="W485" LEMMA="chcieć" POS="praet:sg:f:imperf">chciała</W>
  679 + <W ID="W486" LEMMA="także" POS="qub">także</W>
  680 + <W ID="W487" LEMMA="prząść" POS="inf:imperf">prząść</W>
  681 + <W ID="W488" LEMMA="." POS="interp">.</W>
  682 + </CLAUSE>
  683 + </S>
  684 + <S ID="S19">
  685 + <CLAUSE ID="CLAUSE77">
  686 + <W ID="W489" LEMMA="ledwie" POS="qub">Ledwie</W>
  687 + <W ID="W490" LEMMA="dotknąć" POS="praet:sg:f:perf">dotknęła</W>
  688 + <W ID="W491" LEMMA="wrzeciono" POS="subst:pl:acc:n">wrzeciona</W>
  689 + <W ID="W492" LEMMA="," POS="interp">,</W>
  690 + </CLAUSE>
  691 + <CLAUSE ID="CLAUSE78">
  692 + <W ID="W493" LEMMA="spełnić" POS="praet:sg:f:perf">spełniła</W>
  693 + <W ID="W494" LEMMA="się" POS="qub">się</W>
  694 + <W ID="W495" LEMMA="zły" POS="adj:sg:nom:f:pos">zła</W>
  695 + <W ID="W496" LEMMA="przepowiednia" POS="subst:sg:nom:f">przepowiednia</W>
  696 + </CLAUSE>
  697 + <CLAUSE ID="CLAUSE79">
  698 + <W ID="W497" LEMMA="i" POS="conj">i</W>
  699 + <W ID="W498" LEMMA="ukłuć" POS="praet:sg:f:perf">ukłuła</W>
  700 + <W ID="W499" LEMMA="się" POS="qub">się</W>
  701 + <W ID="W500" LEMMA="on" POS="ppron3:sg:inst:m1:ter:akc:npraep">nim</W>
  702 + <W ID="W501" LEMMA="w" POS="prep:acc:nwok">w</W>
  703 + <W ID="W502" LEMMA="palec" POS="subst:sg:acc:m3">palec</W>
  704 + <W ID="W503" LEMMA="." POS="interp">.</W>
  705 + </CLAUSE>
  706 + </S>
  707 + <S ID="S20">
  708 + <CLAUSE ID="CLAUSE80">
  709 + <W ID="W504" LEMMA="a" POS="conj">A</W>
  710 + <W ID="W505" LEMMA="w" POS="prep:loc:nwok">w</W>
  711 + <W ID="W506" LEMMA="chwila" POS="subst:sg:loc:f">chwili</W>
  712 + <W ID="W507" LEMMA="gdy" POS="adv">gdy</W>
  713 + <W ID="W508" LEMMA="poczuć" POS="praet:sg:f:perf">poczuła</W>
  714 + <W ID="W509" LEMMA="ukłucie" POS="subst:sg:nom:n">ukłucie</W>
  715 + <W ID="W510" LEMMA="," POS="interp">,</W>
  716 + </CLAUSE>
  717 + <CLAUSE ID="CLAUSE81">
  718 + <W ID="W511" LEMMA="paść" POS="praet:sg:f:perf">padła</W>
  719 + <W ID="W512" LEMMA="na" POS="prep:acc">na</W>
  720 + <W ID="W513" LEMMA="łóżko" POS="subst:sg:acc:n">łóżko</W>
  721 + <W ID="W514" LEMMA="stać" POS="pact:sg:acc:n:imperf:aff">stojące</W>
  722 + <W ID="W515" LEMMA="obok" POS="adv">obok</W>
  723 + </CLAUSE>
  724 + <CLAUSE ID="CLAUSE82">
  725 + <W ID="W516" LEMMA="i" POS="conj">i</W>
  726 + <W ID="W517" LEMMA="pogrążyć" POS="praet:sg:f:perf">pogrążyła</W>
  727 + <W ID="W518" LEMMA="się" POS="qub">się</W>
  728 + <W ID="W519" LEMMA="w" POS="prep:loc:nwok">w</W>
  729 + <W ID="W520" LEMMA="głęboki" POS="adj:sg:loc:m3:pos">głębokim</W>
  730 + <W ID="W521" LEMMA="sen" POS="subst:sg:loc:m3">śnie</W>
  731 + <W ID="W522" LEMMA="." POS="interp">.</W>
  732 + </CLAUSE>
  733 + </S>
  734 + <S ID="S21">
  735 + <CLAUSE ID="CLAUSE83">
  736 + <W ID="W523" LEMMA="ten" POS="adj:sg:nom:m3:pos">Ten</W>
  737 + <W ID="W524" LEMMA="sen" POS="subst:sg:nom:m3">sen</W>
  738 + <W ID="W525" LEMMA="ogarnąć" POS="praet:sg:m3:perf">ogarnął</W>
  739 + <W ID="W526" LEMMA="również" POS="qub">również</W>
  740 + <W ID="W527" LEMMA="cały" POS="adj:sg:acc:m3:pos">cały</W>
  741 + <W ID="W528" LEMMA="pałac" POS="subst:sg:acc:m3">pałac</W>
  742 + <W ID="W529" LEMMA=":" POS="interp">:</W>
  743 + </CLAUSE>
  744 + <CLAUSE ID="CLAUSE84">
  745 + <W ID="W530" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  746 + <W ID="W531" LEMMA="i" POS="conj">i</W>
  747 + <W ID="W532" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  748 + <W ID="W533" LEMMA="," POS="interp">,</W>
  749 + </CLAUSE>
  750 + <CLAUSE ID="CLAUSE85">
  751 + <W ID="W534" LEMMA="który" POS="adj:pl:nom:m1:pos">którzy</W>
  752 + <W ID="W535" LEMMA="wrócić" POS="praet:pl:m1:perf">wrócili</W>
  753 + <W ID="W536" LEMMA="właśnie" POS="qub">właśnie</W>
  754 + <W ID="W537" LEMMA="do" POS="prep:gen">do</W>
  755 + <W ID="W538" LEMMA="dom" POS="subst:sg:gen:m3">domu</W>
  756 + </CLAUSE>
  757 + <CLAUSE ID="CLAUSE86">
  758 + <W ID="W539" LEMMA="i" POS="conj">i</W>
  759 + <W ID="W540" LEMMA="wkraczać" POS="praet:pl:m1:imperf">wkraczali</W>
  760 + <W ID="W541" LEMMA="na" POS="prep:acc">na</W>
  761 + <W ID="W542" LEMMA="sala" POS="subst:sg:acc:f">salę</W>
  762 + <W ID="W543" LEMMA="," POS="interp">,</W>
  763 + </CLAUSE>
  764 + <CLAUSE ID="CLAUSE87" CONTINUE="CLAUSE84">
  765 + <W ID="W544" LEMMA="zasnąć" POS="praet:pl:m1:perf">zasnęli</W>
  766 + <W ID="W545" LEMMA="wraz" POS="burk">wraz</W>
  767 + <W ID="W546" LEMMA="z" POS="prep:inst:nwok">z</W>
  768 + <W ID="W547" LEMMA="cały" POS="adj:sg:inst:m3:pos">całym</W>
  769 + <W ID="W548" LEMMA="swój" POS="adj:sg:inst:m3:pos">swym</W>
  770 + <W ID="W549" LEMMA="dwór" POS="subst:sg:inst:m3">dworem</W>
  771 + <W ID="W550" LEMMA="." POS="interp">.</W>
  772 + </CLAUSE>
  773 + </S>
  774 + <S ID="S22">
  775 + <CLAUSE ID="CLAUSE88">
  776 + <W ID="W551" LEMMA="zasnąć" POS="praet:pl:m2:perf">Zasnęły</W>
  777 + <W ID="W552" LEMMA="koń" POS="subst:pl:nom:m2">konie</W>
  778 + <W ID="W553" LEMMA="w" POS="prep:loc:nwok">w</W>
  779 + <W ID="W554" LEMMA="stajnia" POS="subst:sg:loc:f">stajni</W>
  780 + <W ID="W555" LEMMA="," POS="interp">,</W>
  781 + <W ID="W556" LEMMA="pies" POS="subst:pl:nom:m2">psy</W>
  782 + <W ID="W557" LEMMA="na" POS="prep:loc">na</W>
  783 + <W ID="W558" LEMMA="podwórze" POS="subst:sg:loc:n">podwórzu</W>
  784 + <W ID="W559" LEMMA="," POS="interp">,</W>
  785 + <W ID="W560" LEMMA="gołąb" POS="subst:pl:nom:m2">gołębie</W>
  786 + <W ID="W561" LEMMA="na" POS="prep:loc">na</W>
  787 + <W ID="W562" LEMMA="dach" POS="subst:sg:loc:m3">dachu</W>
  788 + <W ID="W563" LEMMA="," POS="interp">,</W>
  789 + <W ID="W564" LEMMA="mucha" POS="subst:pl:nom:f">muchy</W>
  790 + <W ID="W565" LEMMA="na" POS="prep:loc">na</W>
  791 + <W ID="W566" LEMMA="ściana" POS="subst:sg:loc:f">ścianie</W>
  792 + <W ID="W567" LEMMA="," POS="interp">,</W>
  793 + </CLAUSE>
  794 + <CLAUSE ID="CLAUSE89">
  795 + <W ID="W568" LEMMA="a" POS="conj">a</W>
  796 + <W ID="W569" LEMMA="nawet" POS="qub">nawet</W>
  797 + <W ID="W570" LEMMA="ogień" POS="subst:sg:nom:m3">ogień</W>
  798 + <W ID="W571" LEMMA="płonąć" POS="pact:sg:acc:m3:imperf:aff">płonący</W>
  799 + <W ID="W572" LEMMA="w" POS="prep:loc:nwok">w</W>
  800 + <W ID="W573" LEMMA="kuchenny" POS="adj:sg:loc:m3:pos">kuchennym</W>
  801 + <W ID="W574" LEMMA="piec" POS="subst:sg:loc:m3">piecu</W>
  802 + <W ID="W575" LEMMA="zgasnąć" POS="praet:sg:m1:perf">zgasł</W>
  803 + </CLAUSE>
  804 + <CLAUSE ID="CLAUSE90">
  805 + <W ID="W576" LEMMA="i" POS="conj">i</W>
  806 + <W ID="W577" LEMMA="usnąć" POS="praet:sg:m1:perf">usnął</W>
  807 + <W ID="W578" LEMMA="," POS="interp">,</W>
  808 + </CLAUSE>
  809 + <CLAUSE ID="CLAUSE91">
  810 + <W ID="W579" LEMMA="a" POS="conj">a</W>
  811 + <W ID="W580" LEMMA="pieczeń" POS="subst:sg:nom:f">pieczeń</W>
  812 + <W ID="W581" LEMMA="przestać" POS="praet:sg:f:perf">przestała</W>
  813 + <W ID="W582" LEMMA="się" POS="qub">się</W>
  814 + <W ID="W583" LEMMA="dusić" POS="inf:imperf">dusić</W>
  815 + <W ID="W584" LEMMA="," POS="interp">,</W>
  816 + </CLAUSE>
  817 + <CLAUSE ID="CLAUSE92">
  818 + <W ID="W585" LEMMA="i" POS="conj">i</W>
  819 + <W ID="W586" LEMMA="kucharz" POS="subst:sg:nom:m1">kucharz</W>
  820 + <W ID="W587" LEMMA="," POS="interp">,</W>
  821 + </CLAUSE>
  822 + <CLAUSE ID="CLAUSE93">
  823 + <W ID="W588" LEMMA="który" POS="adj:sg:nom:m1:pos">który</W>
  824 + <W ID="W589" LEMMA="chcieć" POS="praet:sg:m1:imperf">chciał</W>
  825 + <W ID="W590" LEMMA="pociągnąć" POS="inf:perf">pociągnąć</W>
  826 + <W ID="W591" LEMMA="za" POS="prep:acc">za</W>
  827 + <W ID="W592" LEMMA="włos" POS="subst:pl:acc:m3">włosy</W>
  828 + <W ID="W593" LEMMA="kuchcik" POS="subst:sg:gen:m1">kuchcika</W>
  829 + <W ID="W594" LEMMA="," POS="interp">,</W>
  830 + </CLAUSE>
  831 + <CLAUSE ID="CLAUSE94">
  832 + <W ID="W595" LEMMA="bo" POS="comp">bo</W>
  833 + <W ID="W596" LEMMA="coś" POS="subst:sg:nom:n">coś</W>
  834 + <W ID="W597" LEMMA="przeskrobać" POS="praet:sg:m1:perf">przeskrobał</W>
  835 + <W ID="W598" LEMMA="," POS="interp">,</W>
  836 + </CLAUSE>
  837 + <CLAUSE ID="CLAUSE95" CONTINUE="CLAUSE93">
  838 + <W ID="W599" LEMMA="puścić" POS="praet:sg:m1:perf">puścił</W>
  839 + <W ID="W600" LEMMA="on" POS="ppron3:sg:gen:m1:ter:akc:npraep">jego</W>
  840 + <W ID="W601" LEMMA="czupryna" POS="subst:sg:acc:f">czuprynę</W>
  841 + </CLAUSE>
  842 + <CLAUSE ID="CLAUSE96">
  843 + <W ID="W602" LEMMA="i" POS="conj">i</W>
  844 + <W ID="W603" LEMMA="zasnąć" POS="praet:sg:m1:perf">zasnął</W>
  845 + <W ID="W604" LEMMA="." POS="interp">.</W>
  846 + </CLAUSE>
  847 + </S>
  848 + <S ID="S23">
  849 + <CLAUSE ID="CLAUSE97">
  850 + <W ID="W605" LEMMA="i" POS="conj">I</W>
  851 + <W ID="W606" LEMMA="wiatr" POS="subst:sg:nom:m3">wiatr</W>
  852 + <W ID="W607" LEMMA="ucichnąć" POS="praet:sg:m3:perf">ucichł</W>
  853 + <W ID="W608" LEMMA="," POS="interp">,</W>
  854 + </CLAUSE>
  855 + <CLAUSE ID="CLAUSE98">
  856 + <W ID="W609" LEMMA="a" POS="conj">a</W>
  857 + <W ID="W610" LEMMA="liście" POS="subst:sg:nom:n">liście</W>
  858 + <W ID="W611" LEMMA="drzewo" POS="subst:pl:gen:n">drzew</W>
  859 + <W ID="W612" LEMMA="na" POS="prep:loc">na</W>
  860 + <W ID="W613" LEMMA="dziedziniec" POS="subst:sg:loc:m3">dziedzińcu</W>
  861 + <W ID="W614" LEMMA="znieruchomiać" POS="praet:pl:f:imperf">znieruchomiały</W>
  862 + <W ID="W615" LEMMA="." POS="interp">.</W>
  863 + </CLAUSE>
  864 + </S>
  865 + <S ID="S24">
  866 + <CLAUSE ID="CLAUSE99">
  867 + <W ID="W616" LEMMA="wokół" POS="prep:gen">Wokół</W>
  868 + <W ID="W617" LEMMA="pałac" POS="subst:sg:gen:m3">pałacu</W>
  869 + <W ID="W618" LEMMA="zacząć" POS="praet:sg:m1:perf">zaczął</W>
  870 + <W ID="W619" LEMMA="rosnąć" POS="inf:imperf">rosnąć</W>
  871 + <W ID="W620" LEMMA="cierniowy" POS="adj:sg:acc:m3:pos">cierniowy</W>
  872 + <W ID="W621" LEMMA="żywopłot" POS="subst:sg:acc:m3">żywopłot</W>
  873 + <W ID="W622" LEMMA="," POS="interp">,</W>
  874 + </CLAUSE>
  875 + <CLAUSE ID="CLAUSE100">
  876 + <W ID="W623" LEMMA="który" POS="adj:sg:nom:m3:pos">który</W>
  877 + <W ID="W624" LEMMA="z" POS="prep:inst:nwok">z</W>
  878 + <W ID="W625" LEMMA="każdy" POS="adj:sg:inst:m3:pos">każdym</W>
  879 + <W ID="W626" LEMMA="rok" POS="subst:sg:inst:m3">rokiem</W>
  880 + <W ID="W627" LEMMA="stawać" POS="praet:sg:m3:imperf">stawał</W>
  881 + <W ID="W628" LEMMA="się" POS="qub">się</W>
  882 + <W ID="W629" LEMMA="coraz" POS="adv">coraz</W>
  883 + <W ID="W630" LEMMA="wysoki" POS="adj:sg:nom:m3:com">wyższy</W>
  884 + </CLAUSE>
  885 + <CLAUSE ID="CLAUSE101">
  886 + <W ID="W631" LEMMA="i" POS="conj">i</W>
  887 + <W ID="W632" LEMMA="wreszcie" POS="qub">wreszcie</W>
  888 + <W ID="W633" LEMMA="zarość" POS="praet:sg:m1:perf:nagl">zarósł</W>
  889 + <W ID="W634" LEMMA="cały" POS="adj:sg:acc:m3:pos">cały</W>
  890 + <W ID="W635" LEMMA="pałac" POS="subst:sg:acc:m3">pałac</W>
  891 + <W ID="W636" LEMMA="," POS="interp">,</W>
  892 + </CLAUSE>
  893 + <CLAUSE ID="CLAUSE102">
  894 + <W ID="W637" LEMMA="tak" POS="adv:pos">tak</W>
  895 + <W ID="W638" LEMMA="że" POS="comp">że</W>
  896 + <W ID="W639" LEMMA="nie" POS="qub">nie</W>
  897 + <W ID="W640" LEMMA="być" POS="praet:sg:n:imperf">było</W>
  898 + <W ID="W641" LEMMA="on" POS="ppron3:sg:gen:m1:ter:nakc:npraep">go</W>
  899 + <W ID="W642" LEMMA="już" POS="qub">już</W>
  900 + <W ID="W643" LEMMA="wcale" POS="adv">wcale</W>
  901 + <W ID="W644" LEMMA="widać" POS="pred">widać</W>
  902 + <W ID="W645" LEMMA="," POS="interp">,</W>
  903 + </CLAUSE>
  904 + <CLAUSE ID="CLAUSE103">
  905 + <W ID="W646" LEMMA="zniknąć" POS="praet:sg:f:perf">znikła</W>
  906 + <W ID="W647" LEMMA="nawet" POS="qub">nawet</W>
  907 + <W ID="W648" LEMMA="chorągiewka" POS="subst:sg:nom:f">chorągiewka</W>
  908 + <W ID="W649" LEMMA="na" POS="prep:loc">na</W>
  909 + <W ID="W650" LEMMA="dach" POS="subst:sg:loc:m3">dachu</W>
  910 + <W ID="W651" LEMMA="." POS="interp">.</W>
  911 + </CLAUSE>
  912 + </S>
  913 + <S ID="S25">
  914 + <CLAUSE ID="CLAUSE104">
  915 + <W ID="W652" LEMMA="po" POS="prep:loc">Po</W>
  916 + <W ID="W653" LEMMA="kraj" POS="subst:sg:loc:m3">kraju</W>
  917 + <W ID="W654" LEMMA="zaś" POS="conj">zaś</W>
  918 + <W ID="W655" LEMMA="rozejść" POS="praet:sg:f:perf">rozeszła</W>
  919 + <W ID="W656" LEMMA="się" POS="qub">się</W>
  920 + <W ID="W657" LEMMA="wieść" POS="subst:sg:nom:f">wieść</W>
  921 + <W ID="W658" LEMMA="o" POS="prep:loc">o</W>
  922 + <W ID="W659" LEMMA="śpiący" POS="adj:sg:loc:f:pos">śpiącej</W>
  923 + <W ID="W660" LEMMA="królewna" POS="subst:sg:loc:f">królewnie</W>
  924 + <W ID="W661" LEMMA="różyczka" POS="subst:sg:loc:f">Różyczce</W>
  925 + <W ID="W662" LEMMA="," POS="interp">,</W>
  926 + </CLAUSE>
  927 + <CLAUSE ID="CLAUSE105">
  928 + <W ID="W663" LEMMA="bo" POS="comp">bo</W>
  929 + <W ID="W664" LEMMA="tak" POS="adv:pos">tak</W>
  930 + <W ID="W665" LEMMA="on" POS="ppron3:sg:acc:f:ter:akc:npraep">ją</W>
  931 + <W ID="W666" LEMMA="nazywać" POS="imps:imperf">nazywano</W>
  932 + <W ID="W667" LEMMA="," POS="interp">,</W>
  933 + </CLAUSE>
  934 + <CLAUSE ID="CLAUSE106" CONTINUE="CLAUSE104">
  935 + <W ID="W668" LEMMA="i" POS="conj">i</W>
  936 + <W ID="W669" LEMMA="coraz" POS="adv">coraz</W>
  937 + <W ID="W670" LEMMA="to" POS="qub">to</W>
  938 + <W ID="W671" LEMMA="jakiś" POS="adj:sg:nom:m1:pos">jakiś</W>
  939 + <W ID="W672" LEMMA="królewicz" POS="subst:sg:nom:m1">królewicz</W>
  940 + <W ID="W673" LEMMA="przybywać" POS="praet:sg:m1:imperf">przybywał</W>
  941 + </CLAUSE>
  942 + <CLAUSE ID="CLAUSE107">
  943 + <W ID="W674" LEMMA="i" POS="conj">i</W>
  944 + <W ID="W675" LEMMA="chcieć" POS="praet:sg:m1:imperf">chciał</W>
  945 + <W ID="W676" LEMMA="przedrzeć" POS="inf:perf">przedrzeć</W>
  946 + <W ID="W677" LEMMA="się" POS="qub">się</W>
  947 + <W ID="W678" LEMMA="przez" POS="prep:acc:nwok">przez</W>
  948 + <W ID="W679" LEMMA="gęsty" POS="adj:sg:acc:m3:pos">gęsty</W>
  949 + <W ID="W680" LEMMA="żywopłot" POS="subst:sg:acc:m3">żywopłot</W>
  950 + <W ID="W681" LEMMA="." POS="interp">.</W>
  951 + </CLAUSE>
  952 + </S>
  953 + <S ID="S26">
  954 + <CLAUSE ID="CLAUSE108">
  955 + <W ID="W682" LEMMA="żaden" POS="adj:sg:dat:m1:pos">Żadnemu</W>
  956 + <W ID="W683" LEMMA="się" POS="qub">się</W>
  957 + <W ID="W684" LEMMA="to" POS="subst:sg:nom:n">to</W>
  958 + <W ID="W685" LEMMA="jednak" POS="conj">jednak</W>
  959 + <W ID="W686" LEMMA="nie" POS="qub">nie</W>
  960 + <W ID="W687" LEMMA="udać" POS="praet:sg:n:perf">udało</W>
  961 + <W ID="W688" LEMMA="," POS="interp">,</W>
  962 + </CLAUSE>
  963 + <CLAUSE ID="CLAUSE109">
  964 + <W ID="W689" LEMMA="bowiem" POS="comp">bowiem</W>
  965 + <W ID="W690" LEMMA="cierń" POS="subst:pl:nom:m3">ciernie</W>
  966 + <W ID="W691" LEMMA="powstrzymywać" POS="praet:pl:m3:imperf">powstrzymywały</W>
  967 + <W ID="W692" LEMMA="każdy" POS="adj:sg:gen:m3:pos">każdego</W>
  968 + <W ID="W693" LEMMA="," POS="interp">,</W>
  969 + </CLAUSE>
  970 + <CLAUSE ID="CLAUSE110">
  971 + <W ID="W694" LEMMA="jakby" POS="comp">jakby</W>
  972 + <W ID="W695" LEMMA="mieć" POS="praet:pl:f:imperf">miały</W>
  973 + <W ID="W696" LEMMA="ręka" POS="subst:pl:acc:f">ręce</W>
  974 + <W ID="W697" LEMMA="," POS="interp">,</W>
  975 + </CLAUSE>
  976 + <CLAUSE ID="CLAUSE111" CONTINUE="CLAUSE108">
  977 + <W ID="W698" LEMMA="i" POS="conj">i</W>
  978 + <W ID="W699" LEMMA="młodzieniec" POS="subst:pl:nom:m1">młodzieńcy</W>
  979 + <W ID="W700" LEMMA="," POS="interp">,</W>
  980 + <W ID="W701" LEMMA="wczepić" POS="ppas:pl:nom:m1:perf:aff">wczepieni</W>
  981 + <W ID="W702" LEMMA="w" POS="prep:acc:nwok">w</W>
  982 + <W ID="W703" LEMMA="on" POS="ppron3:pl:acc:m3:ter:akc:praep">nie</W>
  983 + <W ID="W704" LEMMA="," POS="interp">,</W>
  984 + </CLAUSE>
  985 + <CLAUSE ID="CLAUSE112">
  986 + <W ID="W705" LEMMA="nie" POS="qub">nie</W>
  987 + <W ID="W706" LEMMA="móc" POS="praet:pl:m1:imperf">mogli</W>
  988 + <W ID="W707" LEMMA="się" POS="qub">się</W>
  989 + <W ID="W708" LEMMA="już" POS="qub">już</W>
  990 + <W ID="W709" LEMMA="wyzwolić" POS="inf:perf">wyzwolić</W>
  991 + </CLAUSE>
  992 + <CLAUSE ID="CLAUSE113">
  993 + <W ID="W710" LEMMA="i" POS="conj">i</W>
  994 + <W ID="W711" LEMMA="umierać" POS="praet:pl:m1:imperf">umierali</W>
  995 + <W ID="W712" LEMMA="żałosny" POS="adj:sg:acc:f:pos">żałosną</W>
  996 + <W ID="W713" LEMMA="śmierć" POS="subst:sg:inst:f">śmiercią</W>
  997 + <W ID="W714" LEMMA="." POS="interp">.</W>
  998 + </CLAUSE>
  999 + </S>
  1000 + <S ID="S27">
  1001 + <CLAUSE ID="CLAUSE114">
  1002 + <W ID="W715" LEMMA="po" POS="prep:loc">Po</W>
  1003 + <W ID="W716" LEMMA="wiele" POS="num:pl:loc:m3:congr">wielu</W>
  1004 + <W ID="W717" LEMMA="," POS="interp">,</W>
  1005 + <W ID="W718" LEMMA="wiele" POS="num:pl:loc:m3:congr">wielu</W>
  1006 + <W ID="W719" LEMMA="rok" POS="subst:pl:loc:m3">latach</W>
  1007 + <W ID="W720" LEMMA="przybyć" POS="praet:sg:m1:perf">przybył</W>
  1008 + <W ID="W721" LEMMA="znów" POS="qub">znów</W>
  1009 + <W ID="W722" LEMMA="do" POS="prep:gen">do</W>
  1010 + <W ID="W723" LEMMA="kraj" POS="subst:sg:gen:m3">kraju</W>
  1011 + <W ID="W724" LEMMA="ten" POS="adj:sg:gen:m3:pos">tego</W>
  1012 + <W ID="W725" LEMMA="młody" POS="adj:sg:nom:m1:pos">młody</W>
  1013 + <W ID="W726" LEMMA="królewicz" POS="subst:sg:nom:m1">królewicz</W>
  1014 + <W ID="W727" LEMMA="." POS="interp">.</W>
  1015 + </CLAUSE>
  1016 + </S>
  1017 + <S ID="S28">
  1018 + <CLAUSE ID="CLAUSE115">
  1019 + <W ID="W728" LEMMA="słyszeć" POS="praet:sg:m1:imperf">Słyszał</W>
  1020 + <W ID="W729" LEMMA="on" POS="ppron3:sg:nom:m1:ter:akc:npraep">on</W>
  1021 + <W ID="W730" LEMMA="," POS="interp">,</W>
  1022 + </CLAUSE>
  1023 + <CLAUSE ID="CLAUSE116">
  1024 + <W ID="W731" LEMMA="jak" POS="adv">jak</W>
  1025 + <W ID="W732" LEMMA="jakiś" POS="adj:sg:nom:m1:pos">jakiś</W>
  1026 + <W ID="W733" LEMMA="starzec" POS="subst:sg:nom:m1">starzec</W>
  1027 + <W ID="W734" LEMMA="opowiadać" POS="fin:sg:ter:imperf">opowiada</W>
  1028 + <W ID="W735" LEMMA="o" POS="prep:loc">o</W>
  1029 + <W ID="W736" LEMMA="cierniowy" POS="adj:sg:loc:m3:pos">cierniowym</W>
  1030 + <W ID="W737" LEMMA="żywopłot" POS="subst:sg:loc:m3">żywopłocie</W>
  1031 + <W ID="W738" LEMMA="," POS="interp">,</W>
  1032 + </CLAUSE>
  1033 + <CLAUSE ID="CLAUSE117">
  1034 + <W ID="W739" LEMMA="za" POS="prep:inst">za</W>
  1035 + <W ID="W740" LEMMA="który" POS="adj:sg:inst:m3:pos">którym</W>
  1036 + <W ID="W741" LEMMA="ukryć" POS="ppas:sg:nom:m3:perf:aff">ukryty</W>
  1037 + <W ID="W742" LEMMA="być" POS="fin:sg:ter:imperf">jest</W>
  1038 + <W ID="W743" LEMMA="pałac" POS="subst:sg:nom:m3">pałac</W>
  1039 + <W ID="W744" LEMMA="," POS="interp">,</W>
  1040 + </CLAUSE>
  1041 + <CLAUSE ID="CLAUSE118">
  1042 + <W ID="W745" LEMMA="a" POS="conj">a</W>
  1043 + <W ID="W746" LEMMA="w" POS="prep:loc:nwok">w</W>
  1044 + <W ID="W747" LEMMA="on" POS="ppron3:sg:loc:m3:ter:akc:praep">nim</W>
  1045 + <W ID="W748" LEMMA="od" POS="prep:gen:nwok">od</W>
  1046 + <W ID="W749" LEMMA="sto" POS="num:pl:gen:m3:congr">stu</W>
  1047 + <W ID="W750" LEMMA="rok" POS="subst:pl:gen:m3">lat</W>
  1048 + <W ID="W751" LEMMA="spać" POS="fin:sg:ter:imperf">śpi</W>
  1049 + <W ID="W752" LEMMA="prześliczny" POS="adj:sg:nom:f:pos">prześliczna</W>
  1050 + <W ID="W753" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  1051 + <W ID="W754" LEMMA="," POS="interp">,</W>
  1052 + <W ID="W755" LEMMA="zwać" POS="ppas:sg:nom:f:imperf:aff">zwana</W>
  1053 + <W ID="W756" LEMMA="różyczka" POS="subst:sg:inst:f">Różyczką</W>
  1054 + <W ID="W757" LEMMA="," POS="interp">,</W>
  1055 + </CLAUSE>
  1056 + <CLAUSE ID="CLAUSE119">
  1057 + <W ID="W758" LEMMA="wraz" POS="burk">wraz</W>
  1058 + <W ID="W759" LEMMA="z" POS="prep:inst:nwok">z</W>
  1059 + <W ID="W760" LEMMA="on" POS="ppron3:sg:inst:f:ter:akc:praep">nią</W>
  1060 + <W ID="W761" LEMMA="zaś" POS="conj">zaś</W>
  1061 + <W ID="W762" LEMMA="spać" POS="fin:pl:ter:imperf">śpią</W>
  1062 + <W ID="W763" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  1063 + <W ID="W764" LEMMA="i" POS="conj">i</W>
  1064 + <W ID="W765" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  1065 + <W ID="W766" LEMMA="," POS="interp">,</W>
  1066 + <W ID="W767" LEMMA="i" POS="conj">i</W>
  1067 + <W ID="W768" LEMMA="wszystek" POS="adj:pl:nom:m1:pos">wszyscy</W>
  1068 + <W ID="W769" LEMMA="dworzanin" POS="subst:pl:nom:m1">dworzanie</W>
  1069 + <W ID="W770" LEMMA="." POS="interp">.</W>
  1070 + </CLAUSE>
  1071 + </S>
  1072 + <S ID="S29">
  1073 + <CLAUSE ID="CLAUSE120">
  1074 + <W ID="W771" LEMMA="od" POS="prep:gen:nwok">Od</W>
  1075 + <W ID="W772" LEMMA="swój" POS="adj:sg:gen:m1:pos">swego</W>
  1076 + <W ID="W773" LEMMA="dziadek" POS="subst:sg:gen:m1">dziadka</W>
  1077 + <W ID="W774" LEMMA="wiedzieć" POS="praet:sg:m1:imperf">wiedział</W>
  1078 + <W ID="W775" LEMMA="również" POS="qub">również</W>
  1079 + <W ID="W776" LEMMA="," POS="interp">,</W>
  1080 + </CLAUSE>
  1081 + <CLAUSE ID="CLAUSE121">
  1082 + <W ID="W777" LEMMA="że" POS="comp">że</W>
  1083 + <W ID="W778" LEMMA="wiele" POS="num:pl:nom:m1:rec">wielu</W>
  1084 + <W ID="W779" LEMMA="już" POS="qub">już</W>
  1085 + <W ID="W780" LEMMA="królewicz" POS="subst:pl:gen:m1">królewiczów</W>
  1086 + <W ID="W781" LEMMA="próbować" POS="praet:sg:n:imperf">próbowało</W>
  1087 + <W ID="W782" LEMMA="przedrzeć" POS="inf:perf">przedrzeć</W>
  1088 + <W ID="W783" LEMMA="się" POS="qub">się</W>
  1089 + <W ID="W784" LEMMA="przez" POS="prep:acc:nwok">przez</W>
  1090 + <W ID="W785" LEMMA="ów" POS="adj:sg:acc:m3:pos">ów</W>
  1091 + <W ID="W786" LEMMA="żywopłot" POS="subst:sg:acc:m3">żywopłot</W>
  1092 + <W ID="W787" LEMMA="," POS="interp">,</W>
  1093 + </CLAUSE>
  1094 + <CLAUSE ID="CLAUSE122">
  1095 + <W ID="W788" LEMMA="ale" POS="conj">ale</W>
  1096 + <W ID="W789" LEMMA="zawiśle" POS="subst:pl:gen:n">zawiśli</W>
  1097 + <W ID="W790" LEMMA="na" POS="prep:loc">na</W>
  1098 + <W ID="W791" LEMMA="on" POS="ppron3:sg:loc:m3:ter:akc:praep">nim</W>
  1099 + </CLAUSE>
  1100 + <CLAUSE ID="CLAUSE123">
  1101 + <W ID="W792" LEMMA="i" POS="conj">i</W>
  1102 + <W ID="W793" LEMMA="zginąć" POS="praet:pl:m1:perf">zginęli</W>
  1103 + <W ID="W794" LEMMA="smutny" POS="adj:sg:acc:f:pos">smutną</W>
  1104 + <W ID="W795" LEMMA="śmierć" POS="subst:sg:inst:f">śmiercią</W>
  1105 + <W ID="W796" LEMMA="." POS="interp">.</W>
  1106 + </CLAUSE>
  1107 + </S>
  1108 + <S ID="S30">
  1109 + <CLAUSE ID="CLAUSE124">
  1110 + <W ID="W797" LEMMA="-" POS="interp">-</W>
  1111 + <W ID="W798" LEMMA="ja" POS="ppron12:sg:nom:m1:pri">Ja</W>
  1112 + <W ID="W799" LEMMA="się" POS="qub">się</W>
  1113 + <W ID="W800" LEMMA="nic" POS="subst:sg:gen:n">niczego</W>
  1114 + <W ID="W801" LEMMA="nie" POS="qub">nie</W>
  1115 + <W ID="W802" LEMMA="bać" POS="fin:sg:pri:imperf">boję</W>
  1116 + </CLAUSE>
  1117 + <CLAUSE ID="CLAUSE125">
  1118 + <W ID="W803" LEMMA="-" POS="interp">-</W>
  1119 + <W ID="W804" LEMMA="rzec" POS="praet:sg:m1:perf">rzekł</W>
  1120 + <W ID="W805" LEMMA="młodzieniec" POS="subst:sg:nom:m1">młodzieniec</W>
  1121 + </CLAUSE>
  1122 + <CLAUSE ID="CLAUSE126">
  1123 + <W ID="W806" LEMMA="-" POS="interp">-</W>
  1124 + <W ID="W807" LEMMA="udać" POS="fin:sg:pri:perf">udam</W>
  1125 + <W ID="W808" LEMMA="się" POS="qub">się</W>
  1126 + <W ID="W809" LEMMA="do" POS="prep:gen">do</W>
  1127 + <W ID="W810" LEMMA="zaczarowany" POS="adj:sg:gen:m3:pos">zaczarowanego</W>
  1128 + <W ID="W811" LEMMA="pałac" POS="subst:sg:gen:m3">pałacu</W>
  1129 + </CLAUSE>
  1130 + <CLAUSE ID="CLAUSE127">
  1131 + <W ID="W812" LEMMA="i" POS="conj">i</W>
  1132 + <W ID="W813" LEMMA="zobaczyć" POS="fin:sg:pri:perf">zobaczę</W>
  1133 + <W ID="W814" LEMMA="śliczny" POS="adj:sg:acc:f:pos">śliczną</W>
  1134 + <W ID="W815" LEMMA="różyczka" POS="subst:sg:acc:f">Różyczkę</W>
  1135 + <W ID="W816" LEMMA="!" POS="interp">!</W>
  1136 + </CLAUSE>
  1137 + </S>
  1138 + <S ID="S31">
  1139 + <CLAUSE ID="CLAUSE128">
  1140 + <W ID="W817" LEMMA="poczciwy" POS="adj:sg:nom:m1:pos">Poczciwy</W>
  1141 + <W ID="W818" LEMMA="starzec" POS="subst:sg:nom:m1">starzec</W>
  1142 + <W ID="W819" LEMMA="odradzać" POS="praet:sg:m1:imperf">odradzał</W>
  1143 + <W ID="W820" LEMMA="on" POS="ppron3:sg:dat:m1:ter:nakc:npraep">mu</W>
  1144 + <W ID="W821" LEMMA="," POS="interp">,</W>
  1145 + </CLAUSE>
  1146 + <CLAUSE ID="CLAUSE129">
  1147 + <W ID="W822" LEMMA="jak" POS="adv">jak</W>
  1148 + <W ID="W823" LEMMA="móc" POS="praet:sg:m1:imperf:nagl">mógł</W>
  1149 + <W ID="W824" LEMMA="," POS="interp">,</W>
  1150 + </CLAUSE>
  1151 + <CLAUSE ID="CLAUSE130" CONTINUE="CLAUSE128">
  1152 + <W ID="W825" LEMMA="ale" POS="conj">ale</W>
  1153 + <W ID="W826" LEMMA="on" POS="ppron3:sg:nom:m1:ter:akc:npraep">on</W>
  1154 + <W ID="W827" LEMMA="wcale" POS="adv">wcale</W>
  1155 + <W ID="W828" LEMMA="on" POS="ppron3:sg:gen:m1:ter:nakc:npraep">go</W>
  1156 + <W ID="W829" LEMMA="nie" POS="qub">nie</W>
  1157 + <W ID="W830" LEMMA="słuchać" POS="praet:sg:m1:imperf">słuchał</W>
  1158 + <W ID="W831" LEMMA="." POS="interp">.</W>
  1159 + </CLAUSE>
  1160 + </S>
  1161 + <S ID="S32">
  1162 + <CLAUSE ID="CLAUSE131">
  1163 + <W ID="W832" LEMMA="a" POS="conj">A</W>
  1164 + <W ID="W833" LEMMA="wtedy" POS="adv">wtedy</W>
  1165 + <W ID="W834" LEMMA="właśnie" POS="qub">właśnie</W>
  1166 + <W ID="W835" LEMMA="minąć" POS="praet:sg:n:perf">minęło</W>
  1167 + <W ID="W836" LEMMA="sto" POS="num:pl:acc:m3:rec">sto</W>
  1168 + <W ID="W837" LEMMA="rok" POS="subst:pl:gen:m3">lat</W>
  1169 + </CLAUSE>
  1170 + <CLAUSE ID="CLAUSE132">
  1171 + <W ID="W838" LEMMA="i" POS="conj">i</W>
  1172 + <W ID="W839" LEMMA="nadejść" POS="praet:sg:m3:perf">nadszedł</W>
  1173 + <W ID="W840" LEMMA="dzień" POS="subst:sg:nom:m3">dzień</W>
  1174 + <W ID="W841" LEMMA="," POS="interp">,</W>
  1175 + </CLAUSE>
  1176 + <CLAUSE ID="CLAUSE133">
  1177 + <W ID="W842" LEMMA="w" POS="prep:loc:nwok">w</W>
  1178 + <W ID="W843" LEMMA="który" POS="adj:sg:loc:m3:pos">którym</W>
  1179 + <W ID="W844" LEMMA="śpiący" POS="adj:sg:nom:f:pos">śpiąca</W>
  1180 + <W ID="W845" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  1181 + <W ID="W846" LEMMA="mieć" POS="praet:sg:f:imperf">miała</W>
  1182 + <W ID="W847" LEMMA="się" POS="qub">się</W>
  1183 + <W ID="W848" LEMMA="zbudzić" POS="inf:perf">zbudzić</W>
  1184 + <W ID="W849" LEMMA="." POS="interp">.</W>
  1185 + </CLAUSE>
  1186 + </S>
  1187 + <S ID="S33">
  1188 + <CLAUSE ID="CLAUSE134">
  1189 + <W ID="W850" LEMMA="kiedy" POS="adv">Kiedy</W>
  1190 + <W ID="W851" LEMMA="królewicz" POS="subst:sg:nom:m1">królewicz</W>
  1191 + <W ID="W852" LEMMA="zbliżyć" POS="praet:sg:m1:perf">zbliżył</W>
  1192 + <W ID="W853" LEMMA="się" POS="qub">się</W>
  1193 + <W ID="W854" LEMMA="do" POS="prep:gen">do</W>
  1194 + <W ID="W855" LEMMA="żywopłot" POS="subst:sg:gen:m3">żywopłotu</W>
  1195 + <W ID="W856" LEMMA="," POS="interp">,</W>
  1196 + </CLAUSE>
  1197 + <CLAUSE ID="CLAUSE135">
  1198 + <W ID="W857" LEMMA="być" POS="praet:sg:m1:imperf">był</W>
  1199 + <W ID="W858" LEMMA="on" POS="ppron3:sg:nom:m1:ter:akc:npraep">on</W>
  1200 + <W ID="W859" LEMMA="pokryć" POS="ppas:sg:nom:m1:perf:aff">pokryty</W>
  1201 + <W ID="W860" LEMMA="wielki" POS="subst:pl:inst:m1">wielkimi</W>
  1202 + <W ID="W861" LEMMA="wspaniały" POS="adj:pl:inst:m3:pos">wspaniałymi</W>
  1203 + <W ID="W862" LEMMA="kwiat" POS="subst:pl:inst:m3">kwiatami</W>
  1204 + <W ID="W863" LEMMA="," POS="interp">,</W>
  1205 + </CLAUSE>
  1206 + <CLAUSE ID="CLAUSE136">
  1207 + <W ID="W864" LEMMA="który" POS="adj:pl:nom:m3:pos">które</W>
  1208 + <W ID="W865" LEMMA="sam" POS="adj:pl:nom:f:pos">same</W>
  1209 + <W ID="W866" LEMMA="się" POS="qub">się</W>
  1210 + <W ID="W867" LEMMA="przed" POS="prep:inst:nwok">przed</W>
  1211 + <W ID="W868" LEMMA="on" POS="ppron3:sg:inst:m1:ter:akc:praep">nim</W>
  1212 + <W ID="W869" LEMMA="rozstąpić" POS="praet:pl:f:perf">rozstąpiły</W>
  1213 + <W ID="W870" LEMMA="," POS="interp">,</W>
  1214 + <W ID="W871" LEMMA="wpuszczać" POS="pcon:imperf">wpuszczając</W>
  1215 + <W ID="W872" LEMMA="on" POS="ppron3:sg:acc:m1:ter:nakc:npraep">go</W>
  1216 + <W ID="W873" LEMMA="do" POS="prep:gen">do</W>
  1217 + <W ID="W874" LEMMA="środek" POS="subst:sg:gen:m3">środka</W>
  1218 + <W ID="W875" LEMMA="," POS="interp">,</W>
  1219 + </CLAUSE>
  1220 + <CLAUSE ID="CLAUSE137">
  1221 + <W ID="W876" LEMMA="a" POS="conj">a</W>
  1222 + <W ID="W877" LEMMA="potem" POS="adv">potem</W>
  1223 + <W ID="W878" LEMMA="zewrzeć" POS="praet:pl:f:perf">zwarły</W>
  1224 + <W ID="W879" LEMMA="się" POS="qub">się</W>
  1225 + <W ID="W880" LEMMA="znowu" POS="qub">znowu</W>
  1226 + <W ID="W881" LEMMA="w" POS="prep:acc:nwok">w</W>
  1227 + <W ID="W882" LEMMA="gęsty" POS="adj:sg:acc:m3:pos">gęsty</W>
  1228 + <W ID="W883" LEMMA="żywopłot" POS="subst:sg:acc:m3">żywopłot</W>
  1229 + <W ID="W884" LEMMA="." POS="interp">.</W>
  1230 + </CLAUSE>
  1231 + </S>
  1232 + <S ID="S34">
  1233 + <CLAUSE ID="CLAUSE138">
  1234 + <W ID="W885" LEMMA="na" POS="prep:loc">Na</W>
  1235 + <W ID="W886" LEMMA="dziedziniec" POS="subst:sg:loc:m3">dziedzińcu</W>
  1236 + <W ID="W887" LEMMA="pałacowy" POS="adj:sg:loc:m3:pos">pałacowym</W>
  1237 + <W ID="W888" LEMMA="królewicz" POS="subst:sg:nom:m1">królewicz</W>
  1238 + <W ID="W889" LEMMA="ujrzeć" POS="praet:sg:m1:perf">ujrzał</W>
  1239 + <W ID="W890" LEMMA="uśpić" POS="ppas:pl:nom:n:perf:aff">uśpione</W>
  1240 + <W ID="W891" LEMMA="koń" POS="subst:pl:nom:m2">konie</W>
  1241 + <W ID="W892" LEMMA="i" POS="conj">i</W>
  1242 + <W ID="W893" LEMMA="także" POS="qub">także</W>
  1243 + <W ID="W894" LEMMA="pies" POS="subst:pl:nom:m2">psy</W>
  1244 + <W ID="W895" LEMMA="myśliwski" POS="adj:pl:nom:m2:pos">myśliwskie</W>
  1245 + <W ID="W896" LEMMA="," POS="interp">,</W>
  1246 + </CLAUSE>
  1247 + <CLAUSE ID="CLAUSE139">
  1248 + <W ID="W897" LEMMA="na" POS="prep:loc">na</W>
  1249 + <W ID="W898" LEMMA="dach" POS="subst:sg:loc:m3">dachu</W>
  1250 + <W ID="W899" LEMMA="siedzieć" POS="praet:pl:m3:imperf">siedziały</W>
  1251 + <W ID="W900" LEMMA="Gołąb" POS="subst:pl:acc:m3">gołębie</W>
  1252 + </CLAUSE>
  1253 + <CLAUSE ID="CLAUSE140">
  1254 + <W ID="W901" LEMMA="i" POS="conj">i</W>
  1255 + <W ID="W902" LEMMA="każdy" POS="adj:sg:nom:m1:pos">każdy</W>
  1256 + <W ID="W903" LEMMA="mieć" POS="praet:sg:m1:imperf">miał</W>
  1257 + <W ID="W904" LEMMA="łepek" POS="subst:sg:acc:m3">łepek</W>
  1258 + <W ID="W905" LEMMA="schować" POS="ppas:sg:acc:m3:perf:aff">schowany</W>
  1259 + <W ID="W906" LEMMA="pod" POS="prep:acc:nwok">pod</W>
  1260 + <W ID="W907" LEMMA="skrzydełko" POS="subst:sg:acc:n">skrzydełko</W>
  1261 + <W ID="W908" LEMMA="." POS="interp">.</W>
  1262 + </CLAUSE>
  1263 + </S>
  1264 + <S ID="S35">
  1265 + <CLAUSE ID="CLAUSE141">
  1266 + <W ID="W909" LEMMA="a" POS="conj">A</W>
  1267 + <W ID="W910" LEMMA="kiedy" POS="adv">kiedy</W>
  1268 + <W ID="W911" LEMMA="przekroczyć" POS="praet:sg:m1:perf">przekroczył</W>
  1269 + <W ID="W912" LEMMA="próg" POS="subst:sg:acc:m3">próg</W>
  1270 + <W ID="W913" LEMMA="pałac" POS="subst:sg:gen:m3">pałacu</W>
  1271 + <W ID="W914" LEMMA="," POS="interp">,</W>
  1272 + </CLAUSE>
  1273 + <CLAUSE ID="CLAUSE142">
  1274 + <W ID="W915" LEMMA="mucha" POS="subst:pl:nom:f">muchy</W>
  1275 + <W ID="W916" LEMMA="spała" POS="subst:sg:gen:f">spały</W>
  1276 + <W ID="W917" LEMMA="na" POS="prep:loc">na</W>
  1277 + <W ID="W918" LEMMA="ściana" POS="subst:pl:loc:f">ścianach</W>
  1278 + <W ID="W919" LEMMA="," POS="interp">,</W>
  1279 + </CLAUSE>
  1280 + <CLAUSE ID="CLAUSE143">
  1281 + <W ID="W920" LEMMA="kucharz" POS="subst:sg:nom:m1">kucharz</W>
  1282 + <W ID="W921" LEMMA="stać" POS="praet:sg:m1:imperf">stał</W>
  1283 + <W ID="W922" LEMMA="z" POS="prep:inst:nwok">z</W>
  1284 + <W ID="W923" LEMMA="wyciągnąć" POS="ppas:sg:inst:f:perf:aff">wyciągniętą</W>
  1285 + <W ID="W924" LEMMA="ręka" POS="subst:sg:inst:f">ręką</W>
  1286 + <W ID="W925" LEMMA="," POS="interp">,</W>
  1287 + </CLAUSE>
  1288 + <CLAUSE ID="CLAUSE144">
  1289 + <W ID="W926" LEMMA="jakby" POS="comp">jakby</W>
  1290 + <W ID="W927" LEMMA="chcieć" POS="praet:sg:m1:imperf">chciał</W>
  1291 + <W ID="W928" LEMMA="chwycić" POS="inf:perf">chwycić</W>
  1292 + <W ID="W929" LEMMA="kuchcik" POS="subst:sg:acc:m1">kuchcika</W>
  1293 + <W ID="W930" LEMMA="za" POS="prep:acc">za</W>
  1294 + <W ID="W931" LEMMA="czupryna" POS="subst:sg:acc:f">czuprynę</W>
  1295 + <W ID="W932" LEMMA="," POS="interp">,</W>
  1296 + </CLAUSE>
  1297 + <CLAUSE ID="CLAUSE145" CONTINUE="CLAUSE143">
  1298 + <W ID="W933" LEMMA="a" POS="conj">a</W>
  1299 + <W ID="W934" LEMMA="dziewka" POS="subst:sg:nom:f">dziewka</W>
  1300 + <W ID="W935" LEMMA="kuchenny" POS="adj:sg:nom:f:pos">kuchenna</W>
  1301 + <W ID="W936" LEMMA="siedzieć" POS="praet:sg:f:imperf">siedziała</W>
  1302 + <W ID="W937" LEMMA="," POS="interp">,</W>
  1303 + <W ID="W938" LEMMA="trzymać" POS="pcon:imperf">trzymając</W>
  1304 + <W ID="W939" LEMMA="na" POS="prep:loc">na</W>
  1305 + <W ID="W940" LEMMA="kolano" POS="subst:pl:loc:n">kolanach</W>
  1306 + <W ID="W941" LEMMA="czarny" POS="adj:sg:acc:f:pos">czarną</W>
  1307 + <W ID="W942" LEMMA="kura" POS="subst:sg:acc:f">kurę</W>
  1308 + <W ID="W943" LEMMA="," POS="interp">,</W>
  1309 + </CLAUSE>
  1310 + <CLAUSE ID="CLAUSE146">
  1311 + <W ID="W944" LEMMA="który" POS="adj:sg:acc:f:pos">którą</W>
  1312 + <W ID="W945" LEMMA="chcieć" POS="praet:sg:f:imperf">chciała</W>
  1313 + <W ID="W946" LEMMA="oskubać" POS="inf:perf">oskubać</W>
  1314 + <W ID="W947" LEMMA="." POS="interp">.</W>
  1315 + </CLAUSE>
  1316 + </S>
  1317 + <S ID="S36">
  1318 + <CLAUSE ID="CLAUSE147">
  1319 + <W ID="W948" LEMMA="pójść" POS="praet:sg:m1:perf">Poszedł</W>
  1320 + <W ID="W949" LEMMA="daleko" POS="adv:com">dalej</W>
  1321 + </CLAUSE>
  1322 + <CLAUSE ID="CLAUSE148">
  1323 + <W ID="W950" LEMMA="i" POS="conj">i</W>
  1324 + <W ID="W951" LEMMA="zobaczyć" POS="praet:sg:m1:perf">zobaczył</W>
  1325 + <W ID="W952" LEMMA="wszystek" POS="adj:pl:gen:m1:pos">wszystkich</W>
  1326 + <W ID="W953" LEMMA="dworzanin" POS="subst:pl:gen:m1">dworzan</W>
  1327 + <W ID="W954" LEMMA="spać" POS="pact:pl:gen:m1:imperf:aff">śpiących</W>
  1328 + <W ID="W955" LEMMA="na" POS="prep:loc">na</W>
  1329 + <W ID="W956" LEMMA="sala" POS="subst:sg:loc:f">sali</W>
  1330 + <W ID="W957" LEMMA="," POS="interp">,</W>
  1331 + </CLAUSE>
  1332 + <CLAUSE ID="CLAUSE149">
  1333 + <W ID="W958" LEMMA="a" POS="conj">a</W>
  1334 + <W ID="W959" LEMMA="obok" POS="prep:gen">obok</W>
  1335 + <W ID="W960" LEMMA="tron" POS="subst:sg:gen:m3">tronu</W>
  1336 + <W ID="W961" LEMMA="leżeć" POS="praet:pl:m1:imperf">leżeli</W>
  1337 + <W ID="W962" LEMMA="uśpić" POS="ppas:pl:nom:m1:perf:aff">uśpieni</W>
  1338 + <W ID="W963" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  1339 + <W ID="W964" LEMMA="i" POS="conj">i</W>
  1340 + <W ID="W965" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  1341 + <W ID="W966" LEMMA="." POS="interp">.</W>
  1342 + </CLAUSE>
  1343 + </S>
  1344 + <S ID="S37">
  1345 + <CLAUSE ID="CLAUSE150">
  1346 + <W ID="W967" LEMMA="królewicz" POS="subst:sg:nom:m1">Królewicz</W>
  1347 + <W ID="W968" LEMMA="iść" POS="praet:sg:m1:imperf">szedł</W>
  1348 + <W ID="W969" LEMMA="coraz" POS="adv">coraz</W>
  1349 + <W ID="W970" LEMMA="daleko" POS="adv:com">dalej</W>
  1350 + <W ID="W971" LEMMA="," POS="interp">,</W>
  1351 + </CLAUSE>
  1352 + <CLAUSE ID="CLAUSE151">
  1353 + <W ID="W972" LEMMA="a" POS="conj">a</W>
  1354 + <W ID="W973" LEMMA="cisza" POS="subst:sg:nom:f">cisza</W>
  1355 + <W ID="W974" LEMMA="dokoła" POS="adv">dokoła</W>
  1356 + <W ID="W975" LEMMA="być" POS="praet:sg:f:imperf">była</W>
  1357 + <W ID="W976" LEMMA="tak" POS="adv:pos">tak</W>
  1358 + <W ID="W977" LEMMA="głęboki" POS="adj:sg:nom:f:pos">głęboka</W>
  1359 + <W ID="W978" LEMMA="," POS="interp">,</W>
  1360 + </CLAUSE>
  1361 + <CLAUSE ID="CLAUSE152">
  1362 + <W ID="W979" LEMMA="że" POS="comp">że</W>
  1363 + <W ID="W980" LEMMA="słyszeć" POS="praet:sg:m1:imperf">słyszał</W>
  1364 + <W ID="W981" LEMMA="własny" POS="adj:sg:acc:m3:pos">własny</W>
  1365 + <W ID="W982" LEMMA="oddech" POS="subst:sg:acc:m3">oddech</W>
  1366 + <W ID="W983" LEMMA="," POS="interp">,</W>
  1367 + </CLAUSE>
  1368 + <CLAUSE ID="CLAUSE153" CONTINUE="CLAUSE150">
  1369 + <W ID="W984" LEMMA="i" POS="conj">i</W>
  1370 + <W ID="W985" LEMMA="wreszcie" POS="qub">wreszcie</W>
  1371 + <W ID="W986" LEMMA="dotrzeć" POS="praet:sg:m1:perf">dotarł</W>
  1372 + <W ID="W987" LEMMA="do" POS="prep:gen">do</W>
  1373 + <W ID="W988" LEMMA="wieża" POS="subst:sg:gen:f">wieży</W>
  1374 + </CLAUSE>
  1375 + <CLAUSE ID="CLAUSE154">
  1376 + <W ID="W989" LEMMA="i" POS="conj">i</W>
  1377 + <W ID="W990" LEMMA="otworzyć" POS="praet:sg:m1:perf">otworzył</W>
  1378 + <W ID="W991" LEMMA="drzwi" POS="subst:pl:acc:n">drzwi</W>
  1379 + <W ID="W992" LEMMA="izdebka" POS="subst:sg:gen:f">izdebki</W>
  1380 + <W ID="W993" LEMMA="," POS="interp">,</W>
  1381 + </CLAUSE>
  1382 + <CLAUSE ID="CLAUSE155">
  1383 + <W ID="W994" LEMMA="gdzie" POS="adv">gdzie</W>
  1384 + <W ID="W995" LEMMA="spać" POS="praet:sg:f:imperf">spała</W>
  1385 + <W ID="W996" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  1386 + <W ID="W997" LEMMA="." POS="interp">.</W>
  1387 + </CLAUSE>
  1388 + </S>
  1389 + <S ID="S38">
  1390 + <CLAUSE ID="CLAUSE156">
  1391 + <W ID="W998" LEMMA="i" POS="conj">I</W>
  1392 + <W ID="W999" LEMMA="ujrzeć" POS="praet:sg:m1:perf">ujrzał</W>
  1393 + <W ID="W1000" LEMMA="dzieweczka" POS="subst:sg:acc:f">dzieweczkę</W>
  1394 + <W ID="W1001" LEMMA="tak" POS="adv:pos">tak</W>
  1395 + <W ID="W1002" LEMMA="piękny" POS="adj:sg:acc:f:pos">piękną</W>
  1396 + <W ID="W1003" LEMMA="," POS="interp">,</W>
  1397 + </CLAUSE>
  1398 + <CLAUSE ID="CLAUSE157">
  1399 + <W ID="W1004" LEMMA="że" POS="comp">że</W>
  1400 + <W ID="W1005" LEMMA="nie" POS="qub">nie</W>
  1401 + <W ID="W1006" LEMMA="móc" POS="praet:sg:m1:imperf:nagl">mógł</W>
  1402 + <W ID="W1007" LEMMA="oderwać" POS="inf:perf">oderwać</W>
  1403 + <W ID="W1008" LEMMA="od" POS="prep:gen:nwok">od</W>
  1404 + <W ID="W1009" LEMMA="on" POS="ppron3:sg:gen:f:ter:akc:praep">niej</W>
  1405 + <W ID="W1010" LEMMA="oko" POS="subst:pl:gen:n">oczu</W>
  1406 + <W ID="W1011" LEMMA="," POS="interp">,</W>
  1407 + </CLAUSE>
  1408 + <CLAUSE ID="CLAUSE158">
  1409 + <W ID="W1012" LEMMA="pochylić" POS="praet:sg:m1:perf">pochylił</W>
  1410 + <W ID="W1013" LEMMA="się" POS="qub">się</W>
  1411 + </CLAUSE>
  1412 + <CLAUSE ID="CLAUSE159">
  1413 + <W ID="W1014" LEMMA="i" POS="conj">i</W>
  1414 + <W ID="W1015" LEMMA="pocałować" POS="praet:sg:m1:perf">pocałował</W>
  1415 + <W ID="W1016" LEMMA="on" POS="ppron3:sg:acc:f:ter:akc:npraep">ją</W>
  1416 + <W ID="W1017" LEMMA="." POS="interp">.</W>
  1417 + </CLAUSE>
  1418 + </S>
  1419 + <S ID="S39">
  1420 + <CLAUSE ID="CLAUSE160">
  1421 + <W ID="W1018" LEMMA="po" POS="prep:loc">Po</W>
  1422 + <W ID="W1019" LEMMA="ten" POS="adj:sg:loc:m3:pos">tym</W>
  1423 + <W ID="W1020" LEMMA="pocałunek" POS="subst:sg:loc:m3">pocałunku</W>
  1424 + <W ID="W1021" LEMMA="królewna" POS="subst:sg:nom:f">królewna</W>
  1425 + <W ID="W1022" LEMMA="otworzyć" POS="praet:sg:f:perf">otworzyła</W>
  1426 + <W ID="W1023" LEMMA="oko" POS="subst:pl:acc:n">oczy</W>
  1427 + <W ID="W1024" LEMMA="," POS="interp">,</W>
  1428 + </CLAUSE>
  1429 + <CLAUSE ID="CLAUSE161">
  1430 + <W ID="W1025" LEMMA="zbudzić" POS="praet:sg:f:perf">zbudziła</W>
  1431 + <W ID="W1026" LEMMA="się" POS="qub">się</W>
  1432 + </CLAUSE>
  1433 + <CLAUSE ID="CLAUSE162">
  1434 + <W ID="W1027" LEMMA="i" POS="conj">i</W>
  1435 + <W ID="W1028" LEMMA="spojrzeć" POS="praet:sg:f:perf">spojrzała</W>
  1436 + <W ID="W1029" LEMMA="na" POS="prep:acc">na</W>
  1437 + <W ID="W1030" LEMMA="on" POS="ppron3:sg:acc:m1:ter:akc:praep">niego</W>
  1438 + <W ID="W1031" LEMMA="z" POS="prep:inst:nwok">z</W>
  1439 + <W ID="W1032" LEMMA="uroczy" POS="adj:sg:inst:m3:pos">uroczym</W>
  1440 + <W ID="W1033" LEMMA="uśmiech" POS="subst:sg:inst:m3">uśmiechem</W>
  1441 + <W ID="W1034" LEMMA="." POS="interp">.</W>
  1442 + </CLAUSE>
  1443 + </S>
  1444 + <S ID="S40">
  1445 + <CLAUSE ID="CLAUSE163">
  1446 + <W ID="W1035" LEMMA="zejść" POS="praet:pl:m1:perf">Zeszli</W>
  1447 + <W ID="W1036" LEMMA="potem" POS="adv">potem</W>
  1448 + <W ID="W1037" LEMMA="razem" POS="adv">razem</W>
  1449 + <W ID="W1038" LEMMA="na" POS="prep:acc">na</W>
  1450 + <W ID="W1039" LEMMA="dół" POS="subst:sg:acc:m3">dół</W>
  1451 + <W ID="W1040" LEMMA="," POS="interp">,</W>
  1452 + </CLAUSE>
  1453 + <CLAUSE ID="CLAUSE164">
  1454 + <W ID="W1041" LEMMA="a" POS="conj">a</W>
  1455 + <W ID="W1042" LEMMA="wtedy" POS="adv">wtedy</W>
  1456 + <W ID="W1043" LEMMA="zbudzić" POS="praet:sg:m1:perf">zbudził</W>
  1457 + <W ID="W1044" LEMMA="się" POS="qub">się</W>
  1458 + <W ID="W1045" LEMMA="król" POS="subst:sg:nom:m1">król</W>
  1459 + <W ID="W1046" LEMMA="," POS="interp">,</W>
  1460 + <W ID="W1047" LEMMA="królowa" POS="subst:sg:nom:f">królowa</W>
  1461 + <W ID="W1048" LEMMA="i" POS="conj">i</W>
  1462 + <W ID="W1049" LEMMA="cały" POS="adj:sg:nom:m3:pos">cały</W>
  1463 + <W ID="W1050" LEMMA="dwór" POS="subst:sg:nom:m3">dwór</W>
  1464 + </CLAUSE>
  1465 + <CLAUSE ID="CLAUSE165">
  1466 + <W ID="W1051" LEMMA="i" POS="conj">i</W>
  1467 + <W ID="W1052" LEMMA="jeden" POS="adj:pl:nom:m1:pos">jedni</W>
  1468 + <W ID="W1053" LEMMA="patrzyć" POS="praet:pl:m1:imperf">patrzyli</W>
  1469 + <W ID="W1054" LEMMA="na" POS="prep:loc">na</W>
  1470 + <W ID="W1055" LEMMA="drugi" POS="adj:pl:loc:m3:pos">drugich</W>
  1471 + <W ID="W1056" LEMMA="z" POS="prep:inst:wok">ze</W>
  1472 + <W ID="W1057" LEMMA="zdumienie" POS="subst:sg:inst:n">zdumieniem</W>
  1473 + <W ID="W1058" LEMMA="." POS="interp">.</W>
  1474 + </CLAUSE>
  1475 + </S>
  1476 + <S ID="S41">
  1477 + <CLAUSE ID="CLAUSE166">
  1478 + <W ID="W1059" LEMMA="koń" POS="subst:pl:nom:m2">Konie</W>
  1479 + <W ID="W1060" LEMMA="na" POS="prep:loc">na</W>
  1480 + <W ID="W1061" LEMMA="podwórko" POS="subst:sg:loc:n">podwórku</W>
  1481 + <W ID="W1062" LEMMA="podnieść" POS="praet:pl:m2:perf">podniosły</W>
  1482 + <W ID="W1063" LEMMA="się" POS="qub">się</W>
  1483 + <W ID="W1064" LEMMA="potrząsać" POS="pcon:imperf">potrząsając</W>
  1484 + <W ID="W1065" LEMMA="grzywa" POS="subst:pl:inst:f">grzywami</W>
  1485 + <W ID="W1066" LEMMA="," POS="interp">,</W>
  1486 + </CLAUSE>
  1487 + <CLAUSE ID="CLAUSE167">
  1488 + <W ID="W1067" LEMMA="pies" POS="subst:pl:acc:m2">psy</W>
  1489 + <W ID="W1068" LEMMA="myślwskie" POS="ign">myślwskie</W>
  1490 + <W ID="W1069" LEMMA="jąć" POS="praet:pl:m2:perf">jęły</W>
  1491 + <W ID="W1070" LEMMA="skakać" POS="inf:imperf">skakać</W>
  1492 + <W ID="W1071" LEMMA="i" POS="conj">i</W>
  1493 + <W ID="W1072" LEMMA="machać" POS="inf:imperf">machać</W>
  1494 + <W ID="W1073" LEMMA="ogon" POS="subst:pl:inst:m3">ogonami</W>
  1495 + <W ID="W1074" LEMMA="," POS="interp">,</W>
  1496 + </CLAUSE>
  1497 + <CLAUSE ID="CLAUSE168">
  1498 + <W ID="W1075" LEMMA="gołąb" POS="subst:pl:nom:m2">gołębie</W>
  1499 + <W ID="W1076" LEMMA="na" POS="prep:loc">na</W>
  1500 + <W ID="W1077" LEMMA="dach" POS="subst:sg:loc:m3">dachu</W>
  1501 + <W ID="W1078" LEMMA="wyciągnąć" POS="praet:pl:m2:perf">wyciągnęły</W>
  1502 + <W ID="W1079" LEMMA="główka" POS="subst:pl:nom:f">główki</W>
  1503 + <W ID="W1080" LEMMA="spod" POS="prep:gen:nwok">spod</W>
  1504 + <W ID="W1081" LEMMA="skrzydełko" POS="subst:pl:gen:n">skrzydełek</W>
  1505 + <W ID="W1082" LEMMA="," POS="interp">,</W>
  1506 + </CLAUSE>
  1507 + <CLAUSE ID="CLAUSE169">
  1508 + <W ID="W1083" LEMMA="rozejrzeć" POS="praet:pl:f:perf">rozejrzały</W>
  1509 + <W ID="W1084" LEMMA="się" POS="qub">się</W>
  1510 + </CLAUSE>
  1511 + <CLAUSE ID="CLAUSE170">
  1512 + <W ID="W1085" LEMMA="i" POS="conj">i</W>
  1513 + <W ID="W1086" LEMMA="pofrunąć" POS="praet:pl:f:perf">pofrunęły</W>
  1514 + <W ID="W1087" LEMMA="w" POS="prep:acc:nwok">w</W>
  1515 + <W ID="W1088" LEMMA="pole" POS="subst:sg:acc:n">pole</W>
  1516 + <W ID="W1089" LEMMA="," POS="interp">,</W>
  1517 + </CLAUSE>
  1518 + <CLAUSE ID="CLAUSE171">
  1519 + <W ID="W1090" LEMMA="mucha" POS="subst:pl:nom:f">muchy</W>
  1520 + <W ID="W1091" LEMMA="na" POS="prep:loc">na</W>
  1521 + <W ID="W1092" LEMMA="ściana" POS="subst:pl:loc:f">ścianach</W>
  1522 + <W ID="W1093" LEMMA="poruszyć" POS="praet:pl:f:perf">poruszyły</W>
  1523 + <W ID="W1094" LEMMA="się" POS="qub">się</W>
  1524 + <W ID="W1095" LEMMA="," POS="interp">,</W>
  1525 + </CLAUSE>
  1526 + <CLAUSE ID="CLAUSE172">
  1527 + <W ID="W1096" LEMMA="ogień" POS="subst:sg:nom:m3">ogień</W>
  1528 + <W ID="W1097" LEMMA="pod" POS="prep:inst:nwok">pod</W>
  1529 + <W ID="W1098" LEMMA="kuchnia" POS="subst:sg:inst:f">kuchnią</W>
  1530 + <W ID="W1099" LEMMA="zapłonąć" POS="praet:sg:m3:perf">zapłonął</W>
  1531 + </CLAUSE>
  1532 + <CLAUSE ID="CLAUSE173">
  1533 + <W ID="W1100" LEMMA="i" POS="conj">i</W>
  1534 + <W ID="W1101" LEMMA="zacząć" POS="praet:sg:m1:perf">zaczął</W>
  1535 + <W ID="W1102" LEMMA="gotować" POS="inf:imperf">gotować</W>
  1536 + <W ID="W1103" LEMMA="jedzenie" POS="subst:sg:acc:n">jedzenie</W>
  1537 + <W ID="W1104" LEMMA="," POS="interp">,</W>
  1538 + </CLAUSE>
  1539 + <CLAUSE ID="CLAUSE174">
  1540 + <W ID="W1105" LEMMA="pieczeń" POS="subst:sg:nom:f">pieczeń</W>
  1541 + <W ID="W1106" LEMMA="zaskwierczeć" POS="praet:sg:f:perf">zaskwierczała</W>
  1542 + <W ID="W1107" LEMMA="," POS="interp">,</W>
  1543 + </CLAUSE>
  1544 + <CLAUSE ID="CLAUSE175">
  1545 + <W ID="W1108" LEMMA="kucharz" POS="subst:sg:nom:m1">kucharz</W>
  1546 + <W ID="W1109" LEMMA="trzepnąć" POS="praet:sg:m1:perf">trzepnął</W>
  1547 + <W ID="W1110" LEMMA="kuchcik" POS="subst:sg:acc:m1">kuchcika</W>
  1548 + <W ID="W1111" LEMMA="w" POS="prep:acc:nwok">w</W>
  1549 + <W ID="W1112" LEMMA="ucho" POS="subst:sg:acc:n">ucho</W>
  1550 + <W ID="W1113" LEMMA="," POS="interp">,</W>
  1551 + </CLAUSE>
  1552 + <CLAUSE ID="CLAUSE176">
  1553 + <W ID="W1114" LEMMA="a" POS="conj">a</W>
  1554 + <W ID="W1115" LEMMA="dziewka" POS="subst:sg:nom:f">dziewka</W>
  1555 + <W ID="W1116" LEMMA="kuchenny" POS="adj:sg:nom:f:pos">kuchenna</W>
  1556 + <W ID="W1117" LEMMA="oskubać" POS="praet:sg:f:perf">oskubała</W>
  1557 + <W ID="W1118" LEMMA="do" POS="prep:gen">do</W>
  1558 + <W ID="W1119" LEMMA="koniec" POS="subst:sg:gen:m3">końca</W>
  1559 + <W ID="W1120" LEMMA="kura" POS="subst:sg:acc:f">kurę</W>
  1560 + <W ID="W1121" LEMMA="." POS="interp">.</W>
  1561 + </CLAUSE>
  1562 + </S>
  1563 + <S ID="S42">
  1564 + <CLAUSE ID="CLAUSE177">
  1565 + <W ID="W1122" LEMMA="po" POS="prep:loc">Po</W>
  1566 + <W ID="W1123" LEMMA="co" POS="subst:sg:loc:n">czym</W>
  1567 + <W ID="W1124" LEMMA="odbyć" POS="praet:sg:n:perf">odbyło</W>
  1568 + <W ID="W1125" LEMMA="się" POS="qub">się</W>
  1569 + <W ID="W1126" LEMMA="huczny" POS="adj:sg:nom:n:pos">huczne</W>
  1570 + <W ID="W1127" LEMMA="wesele" POS="subst:sg:nom:n">wesele</W>
  1571 + <W ID="W1128" LEMMA="królewicz" POS="subst:sg:gen:m1">królewicza</W>
  1572 + <W ID="W1129" LEMMA="z" POS="prep:inst:nwok">z</W>
  1573 + <W ID="W1130" LEMMA="królewna" POS="subst:sg:inst:f">królewną</W>
  1574 + <W ID="W1131" LEMMA="różyczka" POS="subst:sg:inst:f">Różyczką</W>
  1575 + </CLAUSE>
  1576 + <CLAUSE ID="CLAUSE178">
  1577 + <W ID="W1132" LEMMA="i" POS="conj">i</W>
  1578 + <W ID="W1133" LEMMA="oba" POS="numcol:pl:nom:m1:rec">oboje</W>
  1579 + <W ID="W1134" LEMMA="żyć" POS="praet:pl:m1:imperf">żyli</W>
  1580 + <W ID="W1135" LEMMA="długo" POS="adv:pos">długo</W>
  1581 + <W ID="W1136" LEMMA="i" POS="conj">i</W>
  1582 + <W ID="W1137" LEMMA="szczęśliwie" POS="adv:pos">szczęśliwie</W>
  1583 + <W ID="W1138" LEMMA="." POS="interp">.</W>
  1584 + </CLAUSE>
  1585 + </S>
  1586 +</DOCUMENT>
0 1587 \ No newline at end of file
... ...
ClauseAnnotator/pom.xml 0 → 100644
  1 +++ a/ClauseAnnotator/pom.xml
  1 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3 + <modelVersion>4.0.0</modelVersion>
  4 + <groupId>ipipan.atlas</groupId>
  5 + <artifactId>clauseannotator</artifactId>
  6 + <version>0.1</version>
  7 + <name>Clauseannotator</name>
  8 + <build>
  9 + <plugins>
  10 + <plugin>
  11 + <artifactId>maven-assembly-plugin</artifactId>
  12 + <configuration>
  13 + <archive>
  14 + <manifest>
  15 + <mainClass>ipipan.atlas.clauseannotator.main.Clauseannotator</mainClass>
  16 + </manifest>
  17 + </archive>
  18 + <descriptorRefs>
  19 + <descriptorRef>jar-with-dependencies</descriptorRef>
  20 + </descriptorRefs>
  21 + </configuration>
  22 + </plugin>
  23 + </plugins>
  24 + </build>
  25 + <dependencies>
  26 + <dependency>
  27 + <groupId>log4j</groupId>
  28 + <artifactId>log4j</artifactId>
  29 + <version>1.2.16</version>
  30 + </dependency>
  31 + <dependency>
  32 + <groupId>org.codehaus.woodstox</groupId>
  33 + <artifactId>stax2-api</artifactId>
  34 + <version>3.1.1</version>
  35 + </dependency>
  36 + </dependencies>
  37 +</project>
0 38 \ No newline at end of file
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Clause.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Clause.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.basic;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +public class Clause {
  7 +
  8 + private Sentence sentence;
  9 + private final List<Word> words = new ArrayList<Word>();
  10 +
  11 + private Clause cont = null;
  12 +
  13 + public void add(Word currentWord) {
  14 + this.words.add(currentWord);
  15 + currentWord.setClause(this);
  16 + }
  17 +
  18 + public void addFirst(Word currentWord) {
  19 + this.words.add(0, currentWord);
  20 + currentWord.setClause(this);
  21 + }
  22 +
  23 + public List<Word> getWords() {
  24 + return words;
  25 + }
  26 +
  27 + public Sentence getSentence() {
  28 + return this.sentence;
  29 + }
  30 +
  31 + public void setSentence(Sentence sentence) {
  32 + this.sentence = sentence;
  33 + }
  34 +
  35 + public List<Clause> split(Word w) {
  36 + Clause c1 = new Clause();
  37 + Clause c2 = new Clause();
  38 +
  39 + boolean toC1 = true;
  40 + for (Word word : words) {
  41 + if (toC1) {
  42 + if (word.equals(w)) {
  43 + toC1 = false;
  44 + c2.add(word);
  45 + } else {
  46 + c1.add(word);
  47 + }
  48 + } else {
  49 + c2.add(word);
  50 + }
  51 + }
  52 +
  53 + ArrayList<Clause> l = new ArrayList<Clause>();
  54 + l.add(c1);
  55 + l.add(c2);
  56 + return l;
  57 + }
  58 +
  59 + public Clause getContinuedClause() {
  60 + return cont;
  61 + }
  62 +
  63 + public boolean isFirstInSentence() {
  64 + return this.sentence.getClauses().get(0).equals(this);
  65 + }
  66 +
  67 + public boolean isLastInSentence() {
  68 + return this.sentence.getLastClause().equals(this);
  69 + }
  70 +
  71 + public String toTrimmedString(int len) {
  72 + StringBuffer sb = new StringBuffer();
  73 + boolean first = true;
  74 + for (Word w : words)
  75 + if (first) {
  76 + sb.append(w.toString());
  77 + first = false;
  78 + } else {
  79 + sb.append(" " + w.toString());
  80 + }
  81 +
  82 + String trimmed = sb.toString().substring(0, Math.min(sb.toString().length(), len));
  83 +
  84 + return sb.toString().length() < len ? trimmed : trimmed + "...";
  85 + }
  86 +
  87 + @Override
  88 + public String toString() {
  89 + return toTrimmedString(80);
  90 + }
  91 +
  92 + public void setContinuedClause(Clause clause) {
  93 + this.cont = clause;
  94 + }
  95 +
  96 + public List<Word> getWordsSequence(Word startWord, Word stopWord) {
  97 + int start = -1;
  98 + int stop = -1;
  99 + for (int i = 0; i < words.size(); i++) {
  100 + Word w = words.get(i);
  101 + if (w.equals(startWord)) {
  102 + start = i;
  103 + }
  104 + if (w.equals(stopWord)) {
  105 + stop = i;
  106 + break;
  107 + }
  108 + }
  109 +
  110 + return new ArrayList<Word>(this.words.subList(start, stop + 1));
  111 + }
  112 +
  113 + public Word getFirstWord() {
  114 + return this.words.get(0);
  115 + }
  116 +
  117 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Document.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Document.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.basic;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +public class Document {
  7 +
  8 + private List<Sentence> sentences = new ArrayList<Sentence>();
  9 +
  10 + public void add(Sentence currentSentence) {
  11 + this.sentences.add(currentSentence);
  12 + currentSentence.setDocument(this);
  13 + }
  14 +
  15 + public List<Sentence> getSentences() {
  16 + return sentences;
  17 + }
  18 +
  19 + public List<Sentence> getSentenceNeighbourhood(Sentence s) {
  20 + int pos = -1;
  21 + for (int i = 0; i < sentences.size(); i++) {
  22 + if (sentences.get(i).equals(s)) {
  23 + pos = i;
  24 + break;
  25 + }
  26 + }
  27 +
  28 + int first = Math.max(0, pos - 1);
  29 + int last = Math.min(sentences.size() - 1, pos + 1);
  30 +
  31 + return new ArrayList<Sentence>(sentences.subList(first, last + 1));
  32 + }
  33 +
  34 + public void splitSentence(Sentence s, Word selectedWord) {
  35 + int pos = -1;
  36 + for (int i = 0; i < sentences.size(); i++) {
  37 + if (sentences.get(i).equals(s)) {
  38 + pos = i;
  39 + break;
  40 + }
  41 + }
  42 + sentences.remove(pos);
  43 +
  44 + s.splitClause(selectedWord.getClause(), selectedWord);
  45 + List<Clause> clauses1 = s.getClausesBefore(selectedWord.getClause());
  46 + List<Clause> clauses2 = new ArrayList<Clause>(s.getClauses());
  47 + clauses2.removeAll(clauses1);
  48 +
  49 + Sentence s1 = new Sentence();
  50 + Sentence s2 = new Sentence();
  51 + for (Clause c : clauses1)
  52 + s1.add(c);
  53 + for (Clause c : clauses2)
  54 + s2.add(c);
  55 +
  56 + sentences.add(pos, s1);
  57 + sentences.add(pos + 1, s2);
  58 + s1.setDocument(this);
  59 + s2.setDocument(this);
  60 + }
  61 +
  62 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Marker.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Marker.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.basic;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
  6 +public class Marker {
  7 +
  8 + private final List<Word> words = new ArrayList<Word>();
  9 +
  10 + private String nuc = "";
  11 + private String connect = "";
  12 + private String type = "";
  13 +
  14 + public Marker(List<Word> selectedWords) {
  15 + for (Word w : selectedWords)
  16 + add(w);
  17 + }
  18 +
  19 + public void add(Word w) {
  20 + this.words.add(w);
  21 + w.setMarker(this);
  22 + }
  23 +
  24 + public Marker(String nuc, String connect) {
  25 + if (nuc != null)
  26 + this.nuc = nuc;
  27 + if (connect != null)
  28 + setConnect(connect);
  29 + }
  30 +
  31 + @Override
  32 + public String toString() {
  33 + StringBuffer sb = new StringBuffer();
  34 + for (Word w : words)
  35 + sb.append(" " + w.getOrth());
  36 +
  37 + return sb.substring(1);
  38 + }
  39 +
  40 + public Clause getClause() {
  41 + return this.words.get(0).getClause();
  42 + }
  43 +
  44 + public void setNUC(String nuc) {
  45 + this.nuc = nuc;
  46 + }
  47 +
  48 + public String getNUC() {
  49 + return nuc;
  50 + }
  51 +
  52 + public Word getFirstWord() {
  53 + return words.get(0);
  54 + }
  55 +
  56 + public void deleteMe() {
  57 + for (Word w : words)
  58 + w.setMarker(null);
  59 + }
  60 +
  61 + public List<Word> getWords() {
  62 + return words;
  63 + }
  64 +
  65 + public String getConnect() {
  66 + return connect;
  67 + }
  68 +
  69 + public String getType() {
  70 + return type;
  71 + }
  72 +
  73 + public void setConnect(String connect) {
  74 + this.connect = connect;
  75 + if (!connect.equals(""))
  76 + this.type = "ext";
  77 + else
  78 + this.type = "int";
  79 + }
  80 +
  81 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Sentence.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Sentence.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.basic;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.Collections;
  5 +import java.util.List;
  6 +
  7 +public class Sentence {
  8 +
  9 + private List<Clause> clauses = new ArrayList<Clause>();
  10 + private Document document;
  11 +
  12 + public void add(Clause clause) {
  13 + this.clauses.add(clause);
  14 + clause.setSentence(this);
  15 + }
  16 +
  17 + public List<Clause> getClauses() {
  18 + return clauses;
  19 + }
  20 +
  21 + public void splitClause(Clause c, Word w) {
  22 + int pos = -1;
  23 + for (int i = 0; i < clauses.size(); i++) {
  24 + if (clauses.get(i).equals(c)) {
  25 + pos = i;
  26 + break;
  27 + }
  28 + }
  29 + List<Clause> split = c.split(w);
  30 + deleteClause(c);
  31 +
  32 + clauses.addAll(pos, split);
  33 + for (Clause cl : split) {
  34 + cl.setSentence(this);
  35 + }
  36 + }
  37 +
  38 + public void mergeClauseWithPrevious(Clause c) {
  39 + int pos = -1;
  40 + for (int i = 0; i < clauses.size(); i++) {
  41 + if (clauses.get(i).equals(c)) {
  42 + pos = i;
  43 + break;
  44 + }
  45 + }
  46 + Clause prevClause = clauses.get(pos - 1);
  47 + for (Word w : c.getWords())
  48 + prevClause.add(w);
  49 +
  50 + deleteClause(c);
  51 + }
  52 +
  53 + public void mergeClauseWithNext(Clause c) {
  54 + int pos = -1;
  55 + for (int i = 0; i < clauses.size(); i++) {
  56 + if (clauses.get(i).equals(c)) {
  57 + pos = i;
  58 + break;
  59 + }
  60 + }
  61 + Clause nextClause = clauses.get(pos + 1);
  62 + List<Word> words = new ArrayList<Word>(c.getWords());
  63 + Collections.reverse(words);
  64 + for (Word w : words)
  65 + nextClause.addFirst(w);
  66 +
  67 + deleteClause(c);
  68 + }
  69 +
  70 + private void deleteClause(Clause c) {
  71 + for (Clause clause : clauses)
  72 + if (c.equals(clause.getContinuedClause()))
  73 + clause.setContinuedClause(null);
  74 +
  75 + clauses.remove(c);
  76 + }
  77 +
  78 + public List<Clause> getClausesBefore(Clause c) {
  79 + int pos = 0;
  80 + for (int i = 0; i < clauses.size(); i++)
  81 + if (clauses.get(i).equals(c)) {
  82 + pos = i;
  83 + break;
  84 + }
  85 +
  86 + return new ArrayList<Clause>(clauses.subList(0, pos));
  87 + }
  88 +
  89 + public Clause getLastClause() {
  90 + return clauses.get(clauses.size() - 1);
  91 + }
  92 +
  93 + public void setDocument(Document document) {
  94 + this.document = document;
  95 + }
  96 +
  97 + public Document getDocument() {
  98 + return this.document;
  99 + }
  100 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Word.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Word.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.basic;
  2 +
  3 +import pl.waw.ipipan.zil.summarization.clauseannotator.main.Clauseannotator;
  4 +
  5 +public class Word {
  6 +
  7 + private Clause clause = null;
  8 +
  9 + private String orth = null;
  10 + private String pos;
  11 + private String lemma;
  12 +
  13 + private Marker marker = null;
  14 +
  15 + public Word(String pos, String lemma) {
  16 + this.pos = pos;
  17 + this.lemma = lemma;
  18 + }
  19 +
  20 + public void setOrth(String orth) {
  21 + this.orth = orth;
  22 + }
  23 +
  24 + public String toString() {
  25 + return orth;
  26 + }
  27 +
  28 + public String getOrth() {
  29 + return this.orth;
  30 + }
  31 +
  32 + public Clause getClause() {
  33 + return this.clause;
  34 + }
  35 +
  36 + public void setClause(Clause clause) {
  37 + this.clause = clause;
  38 + }
  39 +
  40 + public String getPos() {
  41 + return this.pos;
  42 + }
  43 +
  44 + public String getLemma() {
  45 + return this.lemma;
  46 + }
  47 +
  48 + public boolean isFirstInClause() {
  49 + return this.clause.getFirstWord().equals(this);
  50 + }
  51 +
  52 + public boolean isVerb() {
  53 + if (Clauseannotator.VERB_POS_REGEXP == null)
  54 + return false;
  55 + return pos.matches(Clauseannotator.VERB_POS_REGEXP);
  56 + }
  57 +
  58 + public Marker getMarker() {
  59 + return this.marker;
  60 + }
  61 +
  62 + public void setMarker(Marker marker) {
  63 + this.marker = marker;
  64 + }
  65 +
  66 + public boolean isInMiddleOfMarker() {
  67 + if (marker == null)
  68 + return false;
  69 +
  70 + if (marker.getFirstWord().equals(this))
  71 + return false;
  72 +
  73 + return true;
  74 + }
  75 +
  76 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/IdGenerator.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/IdGenerator.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.io;
  2 +
  3 +import java.util.HashMap;
  4 +import java.util.Map;
  5 +
  6 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  7 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  8 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  9 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  10 +
  11 +
  12 +public class IdGenerator {
  13 +
  14 + private int nextWordId = 0;
  15 + private int nextClauseId = 0;
  16 + private int nextSentenceId = 0;
  17 + private int nextMarkerId = 0;
  18 +
  19 + private Map<Word, String> word2Id = new HashMap<Word, String>();
  20 + private Map<Clause, String> clause2Id = new HashMap<Clause, String>();
  21 + private Map<Sentence, String> sentence2Id = new HashMap<Sentence, String>();
  22 + private Map<Marker, String> marker2Id = new HashMap<Marker, String>();
  23 +
  24 + public String getId(Word w) {
  25 + if (word2Id.containsKey(w))
  26 + return word2Id.get(w);
  27 +
  28 + String newId = "W" + nextWordId++;
  29 + word2Id.put(w, newId);
  30 + return newId;
  31 + }
  32 +
  33 + public String getId(Marker m) {
  34 + if (marker2Id.containsKey(m))
  35 + return marker2Id.get(m);
  36 +
  37 + String newId = "MARKER" + nextMarkerId++;
  38 + marker2Id.put(m, newId);
  39 + return newId;
  40 + }
  41 +
  42 + public String getId(Sentence s) {
  43 + if (sentence2Id.containsKey(s))
  44 + return sentence2Id.get(s);
  45 +
  46 + String newId = "S" + nextSentenceId++;
  47 + sentence2Id.put(s, newId);
  48 + return newId;
  49 + }
  50 +
  51 + public String getId(Clause c) {
  52 + if (clause2Id.containsKey(c))
  53 + return clause2Id.get(c);
  54 +
  55 + String newId = "CLAUSE" + nextClauseId++;
  56 + clause2Id.put(c, newId);
  57 + return newId;
  58 + }
  59 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLReader.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLReader.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.io;
  2 +
  3 +
  4 +import java.io.File;
  5 +import java.io.FileInputStream;
  6 +import java.io.InputStream;
  7 +import java.util.HashMap;
  8 +import java.util.Map;
  9 +import java.util.Map.Entry;
  10 +
  11 +import javax.xml.stream.XMLInputFactory;
  12 +import javax.xml.stream.XMLStreamReader;
  13 +
  14 +import org.apache.log4j.Logger;
  15 +import org.codehaus.stax2.XMLInputFactory2;
  16 +
  17 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  18 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document;
  19 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  20 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  21 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  22 +
  23 +public class XMLReader {
  24 +
  25 + private static final Logger logger = Logger.getLogger(XMLReader.class);
  26 +
  27 + private static final XMLInputFactory xif = XMLInputFactory2.newInstance();
  28 +
  29 + public static String loadText(File input, Document document) {
  30 + logger.info("Loading text from file: " + input);
  31 +
  32 + String error = null;
  33 +
  34 + InputStream is = null;
  35 + XMLStreamReader sr = null;
  36 + try {
  37 + is = new FileInputStream(input);
  38 + sr = xif.createXMLStreamReader(is);
  39 +
  40 + Sentence currentSentence = null;
  41 + Clause currentClause = null;
  42 + Word currentWord = null;
  43 + Marker currentMarker = null;
  44 +
  45 + Map<String, Clause> id2Clause = new HashMap<String, Clause>();
  46 +
  47 + Map<Clause, String> clause2ContId = new HashMap<Clause, String>();
  48 +
  49 + while (sr.hasNext()) {
  50 + sr.next();
  51 +
  52 + if (sr.isStartElement()) {
  53 + String name = sr.getName().getLocalPart();
  54 +
  55 + if (name.equalsIgnoreCase("S")) {
  56 +
  57 + currentSentence = new Sentence();
  58 +
  59 + // artificial clause for first-time read
  60 + currentClause = new Clause();
  61 +
  62 + } else if (name.equalsIgnoreCase("CLAUSE")) {
  63 +
  64 + String id = sr.getAttributeValue(null, "ID");
  65 + String cont = sr.getAttributeValue(null, "CONTINUE");
  66 +
  67 + if (id == null)
  68 + throw new Exception("Clause without id in line: " + sr.getLocation().getLineNumber());
  69 +
  70 + currentClause = new Clause();
  71 + id2Clause.put(id, currentClause);
  72 +
  73 + if (cont != null && !cont.equals(""))
  74 + clause2ContId.put(currentClause, cont);
  75 +
  76 + } else if (name.equalsIgnoreCase("W")) {
  77 +
  78 + String pos = sr.getAttributeValue(null, "POS");
  79 + String lemma = sr.getAttributeValue(null, "LEMMA");
  80 + if (pos == null)
  81 + pos = sr.getAttributeValue(null, "pos");
  82 + if (lemma == null)
  83 + lemma = sr.getAttributeValue(null, "lemma");
  84 +
  85 + if (currentWord != null)
  86 + throw new Exception("Word starting before previous word finished in line: "
  87 + + sr.getLocation().getLineNumber());
  88 +
  89 + currentWord = new Word(pos, lemma);
  90 +
  91 + } else if (name.equalsIgnoreCase("MARKER")) {
  92 +
  93 + String nuc = sr.getAttributeValue(null, "NUC");
  94 + String connect = sr.getAttributeValue(null, "CONNECT");
  95 +
  96 + currentMarker = new Marker(nuc, connect);
  97 + }
  98 +
  99 + } else if (sr.isEndElement()) {
  100 +
  101 + String name = sr.getName().getLocalPart();
  102 +
  103 + if (name.equalsIgnoreCase("S")) {
  104 +
  105 + if (currentSentence == null)
  106 + throw new Exception("Sentence ending before starting in line: "
  107 + + sr.getLocation().getLineNumber());
  108 +
  109 + // for first-time read
  110 + if (currentClause != null)
  111 + currentSentence.add(currentClause);
  112 +
  113 + document.add(currentSentence);
  114 + currentSentence = null;
  115 +
  116 + } else if (name.equalsIgnoreCase("CLAUSE")) {
  117 +
  118 + currentSentence.add(currentClause);
  119 + currentClause = null;
  120 +
  121 + } else if (name.equalsIgnoreCase("W")) {
  122 +
  123 + if (currentWord == null)
  124 + throw new Exception("Word ending before starting in line: "
  125 + + sr.getLocation().getLineNumber());
  126 +
  127 + if (currentClause == null)
  128 + throw new Exception("Word not in a clause in line: " + sr.getLocation().getLineNumber());
  129 +
  130 + if (currentMarker != null) {
  131 + currentMarker.add(currentWord);
  132 + }
  133 +
  134 + if (currentWord.getPos() == null)
  135 + throw new Exception("Word without pos attribute in line: "
  136 + + sr.getLocation().getLineNumber());
  137 +
  138 + currentClause.add(currentWord);
  139 + currentWord = null;
  140 +
  141 + } else if (name.equalsIgnoreCase("MARKER")) {
  142 +
  143 + if (currentClause == null)
  144 + throw new Exception("Marker not in a clause in line: " + sr.getLocation().getLineNumber());
  145 +
  146 + if (currentMarker == null)
  147 + throw new Exception("Marker ended before started in line: "
  148 + + sr.getLocation().getLineNumber());
  149 +
  150 + currentMarker = null;
  151 + }
  152 +
  153 + } else if (sr.isWhiteSpace()) {
  154 +
  155 + } else if (sr.isCharacters()) {
  156 + if (currentWord != null) {
  157 + if (currentWord.getOrth() != null)
  158 + throw new Exception("Second word orth in line: " + sr.getLocation().getLineNumber());
  159 +
  160 + currentWord.setOrth(sr.getText());
  161 + }
  162 + }
  163 + }
  164 +
  165 + for (Entry<Clause, String> e : clause2ContId.entrySet()) {
  166 + Clause c = e.getKey();
  167 + String contId = e.getValue();
  168 +
  169 + Clause cont = id2Clause.get(contId);
  170 + if (cont == null)
  171 + throw new Exception("Clause with id: " + contId + " not found in line: "
  172 + + sr.getLocation().getLineNumber());
  173 +
  174 + c.setContinuedClause(cont);
  175 + }
  176 +
  177 + } catch (Exception e) {
  178 + error = "Error reading file: " + e.getLocalizedMessage();
  179 +
  180 + } finally {
  181 + try {
  182 + if (is != null)
  183 + is.close();
  184 + if (sr != null)
  185 + sr.close();
  186 + } catch (Exception e) {
  187 + error = "Error closing file: " + input + " Details: " + e.getLocalizedMessage();
  188 + }
  189 + }
  190 +
  191 + logger.info(document.getSentences().size() + " sentences found.");
  192 +
  193 + return error;
  194 + }
  195 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLWriter.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLWriter.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.io;
  2 +
  3 +
  4 +import java.io.BufferedWriter;
  5 +import java.io.File;
  6 +import java.io.FileWriter;
  7 +import java.util.List;
  8 +
  9 +import javax.xml.stream.XMLOutputFactory;
  10 +import javax.xml.stream.XMLStreamException;
  11 +import javax.xml.stream.XMLStreamWriter;
  12 +
  13 +import org.apache.log4j.Logger;
  14 +import org.codehaus.stax2.XMLOutputFactory2;
  15 +
  16 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  17 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  18 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  19 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  20 +
  21 +public class XMLWriter {
  22 +
  23 + private static final Logger logger = Logger.getLogger(XMLWriter.class);
  24 + private static final XMLOutputFactory xof = XMLOutputFactory2.newInstance();
  25 +
  26 + private static final String INDENT = " ";
  27 +
  28 + public static boolean saveFile(File targetFile, List<Sentence> sentences) {
  29 + return saveFile(targetFile, sentences, false, false);
  30 + }
  31 +
  32 + public static boolean saveFile(File targetFile, List<Sentence> sentences, boolean omitClauses, boolean omitMarkers) {
  33 + logger.info("Saving sentences in file: " + targetFile);
  34 + BufferedWriter bw = null;
  35 + XMLStreamWriter xsw = null;
  36 + try {
  37 +
  38 + bw = new BufferedWriter(new FileWriter(targetFile));
  39 + xsw = xof.createXMLStreamWriter(bw);
  40 +
  41 + IdGenerator gen = new IdGenerator();
  42 + writeDocument(xsw, sentences, gen, omitClauses, omitMarkers);
  43 +
  44 + } catch (Exception e) {
  45 + logger.error("Error saving file: " + e.getLocalizedMessage());
  46 + return false;
  47 +
  48 + } finally {
  49 + try {
  50 + if (xsw != null)
  51 + xsw.close();
  52 + if (bw != null)
  53 + bw.close();
  54 +
  55 + } catch (Exception e) {
  56 + logger.error("Error closing file: " + e.getLocalizedMessage());
  57 + return false;
  58 + }
  59 + }
  60 + return true;
  61 + }
  62 +
  63 + private static void writeSentence(XMLStreamWriter xsw, Sentence s, int i, IdGenerator gen, boolean omitClauses,
  64 + boolean omitMarkers) throws XMLStreamException {
  65 +
  66 + indent(xsw, i);
  67 + xsw.writeStartElement("S");
  68 + xsw.writeAttribute("ID", gen.getId(s));
  69 + xsw.writeCharacters("\n");
  70 +
  71 + for (Clause c : s.getClauses())
  72 + writeClause(xsw, c, i + 1, gen, omitClauses, omitMarkers);
  73 +
  74 + indent(xsw, i);
  75 + xsw.writeEndElement(); // S
  76 + xsw.writeCharacters("\n");
  77 + }
  78 +
  79 + private static void writeClause(XMLStreamWriter xsw, Clause c, int i, IdGenerator gen, boolean omitClauses,
  80 + boolean omitMarkers) throws XMLStreamException {
  81 +
  82 + if (!omitClauses) {
  83 + indent(xsw, i);
  84 + xsw.writeStartElement("CLAUSE");
  85 +
  86 + xsw.writeAttribute("ID", gen.getId(c));
  87 +
  88 + Clause cont = c.getContinuedClause();
  89 + if (cont != null)
  90 + xsw.writeAttribute("CONTINUE", gen.getId(c.getContinuedClause()));
  91 +
  92 + xsw.writeCharacters("\n");
  93 + } else {
  94 + i--;
  95 + }
  96 +
  97 + Marker prevMarker = null;
  98 + for (Word w : c.getWords()) {
  99 + Marker currentMarker = w.getMarker();
  100 +
  101 + if (omitMarkers || currentMarker == null) {
  102 +
  103 + if (!omitMarkers && prevMarker != null)
  104 + endMarker(xsw, i + 1);
  105 +
  106 + writeWord(xsw, w, i + 1, gen);
  107 +
  108 + } else {
  109 +
  110 + if (prevMarker == null) {
  111 + startMarker(xsw, currentMarker, i + 1, gen);
  112 +
  113 + } else if (!prevMarker.equals(currentMarker)) {
  114 + endMarker(xsw, i + 1);
  115 + startMarker(xsw, currentMarker, i + 1, gen);
  116 + }
  117 +
  118 + writeWord(xsw, w, i + 2, gen);
  119 + }
  120 +
  121 + prevMarker = currentMarker;
  122 + }
  123 +
  124 + if (!omitMarkers && prevMarker != null)
  125 + endMarker(xsw, i + 1);
  126 +
  127 + if (!omitClauses) {
  128 + indent(xsw, i);
  129 + xsw.writeEndElement(); // CLAUSE
  130 + xsw.writeCharacters("\n");
  131 + }
  132 + }
  133 +
  134 + private static void endMarker(XMLStreamWriter xsw, int i) throws XMLStreamException {
  135 + indent(xsw, i);
  136 + xsw.writeEndElement(); // MARKER
  137 + xsw.writeCharacters("\n");
  138 + }
  139 +
  140 + private static void startMarker(XMLStreamWriter xsw, Marker currentMarker, int i, IdGenerator gen)
  141 + throws XMLStreamException {
  142 + indent(xsw, i);
  143 + xsw.writeStartElement("MARKER");
  144 + xsw.writeAttribute("ID", gen.getId(currentMarker));
  145 + xsw.writeAttribute("NUC", currentMarker.getNUC());
  146 + xsw.writeAttribute("TYPE", currentMarker.getType());
  147 + xsw.writeAttribute("CONNECT", currentMarker.getConnect());
  148 +
  149 + xsw.writeCharacters("\n");
  150 + }
  151 +
  152 + private static void writeWord(XMLStreamWriter xsw, Word w, int i, IdGenerator gen) throws XMLStreamException {
  153 + indent(xsw, i);
  154 + xsw.writeStartElement("W");
  155 + xsw.writeAttribute("ID", gen.getId(w));
  156 + xsw.writeAttribute("LEMMA", w.getLemma());
  157 + xsw.writeAttribute("POS", w.getPos());
  158 +
  159 + xsw.writeCharacters(w.getOrth());
  160 +
  161 + xsw.writeEndElement(); // W
  162 + xsw.writeCharacters("\n");
  163 + }
  164 +
  165 + private static void indent(XMLStreamWriter xsw, int i) throws XMLStreamException {
  166 + for (int j = 0; j < i; j++)
  167 + xsw.writeCharacters(INDENT);
  168 + }
  169 +
  170 + private static void writeDocument(XMLStreamWriter xsw, List<Sentence> sentences, IdGenerator gen,
  171 + boolean omitClauses, boolean omitMarkers) throws XMLStreamException {
  172 + xsw.writeStartDocument("utf-8", "1.0");
  173 + xsw.writeCharacters("\n");
  174 + xsw.writeStartElement("DOCUMENT");
  175 + xsw.writeCharacters("\n");
  176 +
  177 + for (Sentence s : sentences)
  178 + writeSentence(xsw, s, 1, gen, omitClauses, omitMarkers);
  179 +
  180 + xsw.writeEndElement(); // DOCUMENT
  181 + xsw.writeEndDocument();
  182 + }
  183 +
  184 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/BottomPanel.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/BottomPanel.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.awt.Component;
  5 +import java.awt.GridBagConstraints;
  6 +import java.awt.GridBagLayout;
  7 +import java.awt.Insets;
  8 +import java.awt.event.ItemEvent;
  9 +import java.awt.event.ItemListener;
  10 +import java.util.List;
  11 +
  12 +import javax.swing.JComboBox;
  13 +import javax.swing.JLabel;
  14 +import javax.swing.JPanel;
  15 +
  16 +import org.apache.log4j.Logger;
  17 +
  18 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  19 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  20 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  21 +
  22 +public class BottomPanel extends JPanel implements ItemListener {
  23 +
  24 + private static final long serialVersionUID = 285048609353220598L;
  25 + private static final Logger logger = Logger.getLogger(BottomPanel.class);
  26 +
  27 + private final MainTextPane textPane;
  28 +
  29 + // clause stuff
  30 + private final JComboBox<Object> cont = new JComboBox<Object>();
  31 + private final JLabel currentClause = new JLabel("");
  32 +
  33 + // marker stuff
  34 + private final JComboBox<String> markerNUC = new JComboBox<String>();
  35 + private final JComboBox<String> markerConnect = new JComboBox<String>();
  36 + private final JLabel currentMarker = new JLabel("");
  37 +
  38 + {
  39 + markerNUC.addItem("");
  40 +
  41 + markerNUC.addItem("_NN");
  42 + markerNUC.addItem("_NS");
  43 + markerNUC.addItem("_SN");
  44 +
  45 + markerNUC.addItem("N_N");
  46 + markerNUC.addItem("N_S");
  47 + markerNUC.addItem("S_N");
  48 +
  49 + markerNUC.addItem("NN_");
  50 + markerNUC.addItem("NS_");
  51 + markerNUC.addItem("SN_");
  52 +
  53 + markerConnect.addItem("");
  54 +
  55 + markerConnect.addItem("relate");
  56 + markerConnect.addItem("fulfil");
  57 + markerConnect.addItem("expect");
  58 + }
  59 +
  60 + public BottomPanel(MainTextPane mainTextPane) {
  61 + super();
  62 + this.textPane = mainTextPane;
  63 +
  64 + clearClauseSelection();
  65 + clearMarkerSelection();
  66 +
  67 + cont.addItemListener(this);
  68 + markerConnect.addItemListener(this);
  69 + markerNUC.addItemListener(this);
  70 +
  71 + this.setLayout(new GridBagLayout());
  72 + GridBagConstraints c = new GridBagConstraints();
  73 + c.insets = new Insets(5, 5, 5, 5);
  74 +
  75 + // labels
  76 + c.fill = GridBagConstraints.NONE;
  77 + c.gridx = 0;
  78 + c.gridy = GridBagConstraints.RELATIVE;
  79 +
  80 + this.add(new JLabel("Current clause:"), c);
  81 + this.add(new JLabel("Continues:"), c);
  82 + this.add(new JLabel("Current marker:"), c);
  83 + this.add(new JLabel("Current marker nuc:"), c);
  84 + this.add(new JLabel("Current marker connect:"), c);
  85 +
  86 + // values:
  87 + c.weightx = 1;
  88 + c.fill = GridBagConstraints.HORIZONTAL;
  89 + c.gridx = 1;
  90 + c.gridy = GridBagConstraints.RELATIVE;
  91 +
  92 + this.add(currentClause, c);
  93 +
  94 + c.fill = GridBagConstraints.NONE;
  95 + c.anchor = GridBagConstraints.LINE_START;
  96 + this.add(cont, c);
  97 + this.add(currentMarker, c);
  98 + this.add(markerNUC, c);
  99 + this.add(markerConnect, c);
  100 + }
  101 +
  102 + private synchronized void clearMarkerSelection() {
  103 + markerNUC.setEnabled(false);
  104 + markerConnect.setEnabled(false);
  105 +
  106 + currentMarker.setText("No marker selected");
  107 + markerNUC.setSelectedIndex(0);
  108 + markerConnect.setSelectedIndex(0);
  109 + }
  110 +
  111 + private synchronized void clearClauseSelection() {
  112 + cont.setEnabled(false);
  113 + cont.removeAllItems();
  114 + currentClause.setText("No clause selected");
  115 + }
  116 +
  117 + public void selectionChanged(final List<Word> selectedSequence, final Marker m) {
  118 + if (selectedSequence == null) {
  119 + selectMarker(null);
  120 + selectClause(null);
  121 + } else {
  122 + Clause c = selectedSequence.get(0).getClause();
  123 +
  124 + selectClause(c);
  125 + selectMarker(m);
  126 + }
  127 + }
  128 +
  129 + private synchronized void selectClause(Clause clause) {
  130 +
  131 + if (clause == null) {
  132 + clearClauseSelection();
  133 +
  134 + } else {
  135 + currentClause.setText(clause.toString());
  136 +
  137 + cont.setEnabled(false);
  138 + cont.removeAllItems();
  139 + cont.addItem("");
  140 + int sel = 0;
  141 + int i = 1;
  142 +
  143 + for (Clause c : clause.getSentence().getClausesBefore(clause)) {
  144 + if (c.equals(clause.getContinuedClause()))
  145 + sel = i;
  146 +
  147 + cont.addItem(c);
  148 + i++;
  149 + }
  150 +
  151 + cont.setSelectedIndex(sel);
  152 + cont.setEnabled(true);
  153 + }
  154 + }
  155 +
  156 + private synchronized void selectMarker(Marker m) {
  157 +
  158 + if (m == null) {
  159 + clearMarkerSelection();
  160 +
  161 + } else {
  162 + currentMarker.setText(m.toString());
  163 +
  164 + markerNUC.setEnabled(false);
  165 + markerNUC.setSelectedItem(m.getNUC());
  166 + markerNUC.setEnabled(true);
  167 +
  168 + markerConnect.setEnabled(false);
  169 + markerConnect.setSelectedItem(m.getConnect());
  170 + markerConnect.setEnabled(true);
  171 + }
  172 + }
  173 +
  174 + public synchronized void itemStateChanged(ItemEvent e) {
  175 +
  176 + // we don't care about deselection events
  177 + if (e.getStateChange() == ItemEvent.DESELECTED)
  178 + return;
  179 +
  180 + Component c = (Component) e.getSource();
  181 +
  182 + if (c.isEnabled()) {
  183 +
  184 + if (c.equals(cont)) {
  185 + if (cont.getSelectedIndex() > 0) {
  186 + Clause clause = (Clause) cont.getSelectedItem();
  187 + logger.debug("Continuing clause selection changed for: " + clause);
  188 +
  189 + textPane.setContinuingClause(clause);
  190 + } else {
  191 + textPane.setContinuingClause(null);
  192 + }
  193 +
  194 + } else if (c.equals(markerNUC)) {
  195 +
  196 + if (markerNUC.getSelectedIndex() >= 0) {
  197 + String nuc = (String) markerNUC.getSelectedItem();
  198 + logger.debug("Marker nuc selection changed for: " + nuc);
  199 +
  200 + textPane.setMarkerNUC(nuc);
  201 + }
  202 + } else if (c.equals(markerConnect)) {
  203 +
  204 + if (markerConnect.getSelectedIndex() >= 0) {
  205 + String connect = (String) markerConnect.getSelectedItem();
  206 + logger.debug("Marker connect selection changed for: " + connect);
  207 +
  208 + textPane.setMarkerConnect(connect);
  209 + }
  210 + }
  211 + }
  212 + }
  213 +}
0 214 \ No newline at end of file
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Clauseannotator.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Clauseannotator.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.awt.Cursor;
  5 +import java.awt.Dimension;
  6 +import java.awt.Toolkit;
  7 +import java.awt.event.ActionEvent;
  8 +import java.awt.event.ActionListener;
  9 +import java.awt.event.InputEvent;
  10 +import java.awt.event.KeyEvent;
  11 +import java.awt.event.WindowAdapter;
  12 +import java.awt.event.WindowEvent;
  13 +import java.io.BufferedReader;
  14 +import java.io.File;
  15 +import java.io.IOException;
  16 +import java.io.InputStream;
  17 +import java.io.InputStreamReader;
  18 +import java.net.URL;
  19 +import java.util.regex.Pattern;
  20 +
  21 +import javax.swing.JEditorPane;
  22 +import javax.swing.JFileChooser;
  23 +import javax.swing.JFrame;
  24 +import javax.swing.JMenu;
  25 +import javax.swing.JMenuBar;
  26 +import javax.swing.JMenuItem;
  27 +import javax.swing.JOptionPane;
  28 +import javax.swing.JScrollPane;
  29 +import javax.swing.KeyStroke;
  30 +import javax.swing.SwingUtilities;
  31 +import javax.swing.filechooser.FileFilter;
  32 +
  33 +import org.apache.log4j.Logger;
  34 +
  35 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document;
  36 +import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLReader;
  37 +import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLWriter;
  38 +
  39 +public class Clauseannotator extends JFrame implements Runnable {
  40 +
  41 + private static final String WINDOW_TITLE = "Clause and marker annotator";
  42 +
  43 + private static final long serialVersionUID = -3830790411182131318L;
  44 +
  45 + private static final Logger logger = Logger.getLogger(Clauseannotator.class);
  46 +
  47 + private static final int HEIGTH = 600;
  48 + private static final int WIDTH = 800;
  49 +
  50 + public static final String verbposregexpFilename = "verb.regexp";
  51 + public static String VERB_POS_REGEXP = null;
  52 +
  53 + static {
  54 + loadVerPosRegexp();
  55 + }
  56 +
  57 + private JMenuItem save;
  58 +
  59 + private File currentFile = null;
  60 +
  61 + private MainSplitPanel mainSplitPane;
  62 +
  63 + public static void main(String[] args) {
  64 + if (args.length != 0 && args.length != 1) {
  65 + logger.error("Wrong usage! Should be: java -jar " + Clauseannotator.class.getSimpleName() + " [input file]");
  66 + return;
  67 + }
  68 + final Clauseannotator clauseannotator = new Clauseannotator();
  69 + try {
  70 + SwingUtilities.invokeAndWait(clauseannotator);
  71 + } catch (Exception e) {
  72 + logger.error("Error starting application: " + e.getLocalizedMessage());
  73 + e.printStackTrace();
  74 + return;
  75 + }
  76 +
  77 + if (args.length == 1) {
  78 + final File input = new File(args[0]);
  79 + if (input.exists()) {
  80 + SwingUtilities.invokeLater(new Runnable() {
  81 + public void run() {
  82 + clauseannotator.loadFile(input);
  83 + }
  84 + });
  85 + } else {
  86 + logger.error("Input file: " + input + " doesn't exist!");
  87 + }
  88 + }
  89 + }
  90 +
  91 + private static void loadVerPosRegexp() {
  92 + InputStream f = Clauseannotator.class.getClassLoader().getResourceAsStream(verbposregexpFilename);
  93 + if (f != null) {
  94 + String regex = null;
  95 + try {
  96 + BufferedReader bw = new BufferedReader(new InputStreamReader(f));
  97 + regex = bw.readLine();
  98 +
  99 + Pattern.compile(regex);
  100 + } catch (Exception e) {
  101 + logger.error("Error reading regexp file: " + e.getLocalizedMessage());
  102 + return;
  103 + }
  104 + VERB_POS_REGEXP = regex;
  105 + logger.info("Loaded verb regexp: " + regex);
  106 + }
  107 + }
  108 +
  109 + public void run() {
  110 + this.setTitle(WINDOW_TITLE);
  111 + mainSplitPane = new MainSplitPanel(this);
  112 + this.getContentPane().add(mainSplitPane);
  113 + this.createMenu();
  114 + this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
  115 + this.addWindowListener(new MainWindowListener(this));
  116 + this.setSize(WIDTH, HEIGTH);
  117 + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  118 + this.setLocation((screenSize.width - WIDTH) / 2, (screenSize.height - HEIGTH) / 2);
  119 + this.setVisible(true);
  120 + }
  121 +
  122 + private void createMenu() {
  123 + JMenuBar menu = new JMenuBar();
  124 + this.setJMenuBar(menu);
  125 +
  126 + JMenu file = new JMenu("File");
  127 + menu.add(file);
  128 +
  129 + JMenuItem open = new JMenuItem("Open");
  130 + open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
  131 + open.addActionListener(new ActionListener() {
  132 + public void actionPerformed(ActionEvent e) {
  133 + requestOpenFile();
  134 + }
  135 + });
  136 + file.add(open);
  137 +
  138 + save = new JMenuItem("Save");
  139 + save.setEnabled(false);
  140 + save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
  141 + save.addActionListener(new ActionListener() {
  142 + public void actionPerformed(ActionEvent e) {
  143 + requestSaveFile();
  144 + }
  145 + });
  146 + file.add(save);
  147 +
  148 + JMenuItem exit = new JMenuItem("Exit");
  149 + exit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_MASK));
  150 + exit.addActionListener(new ActionListener() {
  151 + public void actionPerformed(ActionEvent e) {
  152 + requestExit();
  153 + }
  154 + });
  155 + file.add(exit);
  156 +
  157 + JMenu other = new JMenu("Other");
  158 + JMenuItem help = new JMenuItem("Help");
  159 + help.addActionListener(new ActionListener() {
  160 + public void actionPerformed(ActionEvent e) {
  161 + requestShowHelp();
  162 + }
  163 + });
  164 +
  165 + other.add(help);
  166 + menu.add(other);
  167 + }
  168 +
  169 + private void requestSaveFile() {
  170 + boolean success = XMLWriter.saveFile(currentFile, mainSplitPane.getSentences());
  171 +
  172 + if (success) {
  173 + setTitle(WINDOW_TITLE);
  174 + save.setEnabled(false);
  175 + } else {
  176 + showError("Error saving file: " + currentFile);
  177 + }
  178 + }
  179 +
  180 + private final void requestOpenFile() {
  181 + if (!askToSaveChanges())
  182 + return;
  183 +
  184 + JFileChooser chooser;
  185 + if (currentFile == null)
  186 + chooser = new JFileChooser();
  187 + else
  188 + chooser = new JFileChooser(currentFile.getParentFile());
  189 +
  190 + chooser.setFileFilter(new SummannotatorFileFilter());
  191 + int result = chooser.showOpenDialog(this);
  192 +
  193 + if (result == JFileChooser.APPROVE_OPTION) {
  194 + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  195 + this.loadFile(chooser.getSelectedFile());
  196 + this.setCursor(null);
  197 + }
  198 + }
  199 +
  200 + private boolean askToSaveChanges() {
  201 + if (!save.isEnabled())
  202 + return true;
  203 +
  204 + int result = JOptionPane.showOptionDialog(this, "Do you want to save changes?", "Unsaved changes",
  205 + JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null);
  206 +
  207 + if (result == JOptionPane.CANCEL_OPTION)
  208 + return false;
  209 +
  210 + if (result == JOptionPane.YES_OPTION)
  211 + requestSaveFile();
  212 +
  213 + return true;
  214 + }
  215 +
  216 + private final void requestExit() {
  217 + if (!askToSaveChanges())
  218 + return;
  219 +
  220 + logger.info("Exiting.");
  221 + System.exit(0);
  222 + }
  223 +
  224 + private final void requestShowHelp() {
  225 + JFrame helpFrame = new JFrame("Help");
  226 + helpFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  227 +
  228 + JEditorPane editorPane = new JEditorPane();
  229 + editorPane.setEditable(false);
  230 + URL helpURL = Clauseannotator.class.getClassLoader().getResource("help.html");
  231 + if (helpURL != null) {
  232 + try {
  233 + editorPane.setPage(helpURL);
  234 + } catch (IOException e) {
  235 + logger.error("Attempted to read a bad URL: " + helpURL);
  236 + }
  237 + } else {
  238 + logger.error("Couldn't find file: help.html");
  239 + }
  240 +
  241 + // Put the editor pane in a scroll pane.
  242 + JScrollPane editorScrollPane = new JScrollPane(editorPane);
  243 + editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
  244 + editorScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  245 + editorScrollPane.setPreferredSize(new Dimension(800, 600));
  246 + editorScrollPane.setMinimumSize(new Dimension(30, 30));
  247 +
  248 + helpFrame.getContentPane().add(editorScrollPane);
  249 + helpFrame.pack();
  250 + helpFrame.setVisible(true);
  251 + }
  252 +
  253 + private final void loadFile(File input) {
  254 + if (!input.exists()) {
  255 + String err = "File " + input + " doesn't exist!";
  256 + logger.error(err);
  257 + showError(err);
  258 + return;
  259 + }
  260 + Document doc = new Document();
  261 + String error = XMLReader.loadText(input, doc);
  262 + if (error != null) {
  263 + logger.error(error);
  264 + showError(error);
  265 + return;
  266 + }
  267 + if (doc.getSentences().size() == 0) {
  268 + String err = "No clauses found in file: " + input;
  269 + logger.error(err);
  270 + showError(err);
  271 + return;
  272 + }
  273 +
  274 + mainSplitPane.setSentences(doc.getSentences());
  275 +
  276 + currentFile = input;
  277 + save.setEnabled(false);
  278 + setTitle(WINDOW_TITLE);
  279 + }
  280 +
  281 + private void showError(String string) {
  282 + JOptionPane.showMessageDialog(this, string, "Error", JOptionPane.ERROR_MESSAGE);
  283 + }
  284 +
  285 + private final class SummannotatorFileFilter extends FileFilter {
  286 + @Override
  287 + public String getDescription() {
  288 + return "XML files";
  289 + }
  290 +
  291 + @Override
  292 + public boolean accept(File f) {
  293 + return f.getName().endsWith(".xml") || f.isDirectory();
  294 + }
  295 + }
  296 +
  297 + public void annotationChanged() {
  298 + save.setEnabled(true);
  299 + setTitle(WINDOW_TITLE + " " + "[unsaved changes]");
  300 + }
  301 +
  302 + private class MainWindowListener extends WindowAdapter {
  303 +
  304 + private Clauseannotator summanotator;
  305 +
  306 + public MainWindowListener(Clauseannotator sumannotator) {
  307 + this.summanotator = sumannotator;
  308 + }
  309 +
  310 + public void windowClosing(WindowEvent we) {
  311 + this.summanotator.requestExit();
  312 + }
  313 + }
  314 +
  315 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/FixIds.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/FixIds.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.io.File;
  5 +
  6 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document;
  7 +import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLReader;
  8 +import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLWriter;
  9 +
  10 +public class FixIds {
  11 +
  12 + public static void main(String[] args) {
  13 +
  14 + File dir = new File(args[0]);
  15 + for (File f : dir.listFiles()) {
  16 + Document doc = new Document();
  17 + XMLReader.loadText(f, doc);
  18 + XMLWriter.saveFile(f, doc.getSentences(), false, true);
  19 + }
  20 + }
  21 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainDocument.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainDocument.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.awt.event.KeyEvent;
  5 +import java.awt.event.KeyListener;
  6 +import java.util.ArrayList;
  7 +import java.util.HashMap;
  8 +import java.util.List;
  9 +import java.util.Map;
  10 +
  11 +import javax.swing.event.CaretEvent;
  12 +import javax.swing.event.CaretListener;
  13 +import javax.swing.text.BadLocationException;
  14 +import javax.swing.text.Caret;
  15 +import javax.swing.text.DefaultStyledDocument;
  16 +import javax.swing.text.SimpleAttributeSet;
  17 +
  18 +import org.apache.log4j.Logger;
  19 +
  20 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  21 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  22 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  23 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  24 +
  25 +public class MainDocument extends DefaultStyledDocument implements CaretListener, KeyListener {
  26 +
  27 + private static final long serialVersionUID = 4276485351817531583L;
  28 + private static final Logger logger = Logger.getLogger(MainDocument.class);
  29 +
  30 + private final MainTextPane textPane;
  31 +
  32 + private List<Word> selectedWords = null;
  33 + private Marker selectedMarker = null;
  34 +
  35 + private List<Word> posToWord = null;
  36 + private Map<Word, Integer> wordToStartPos = null;
  37 + private List<Sentence> sentences = null;
  38 +
  39 + private boolean ignoreCaretUpdate = false;
  40 +
  41 + public MainDocument(MainTextPane mainTextPane) {
  42 + this.textPane = mainTextPane;
  43 + }
  44 +
  45 + public synchronized void setSentences(final List<Sentence> sents) {
  46 +
  47 + ignoreCaretUpdate = true;
  48 +
  49 + try {
  50 + remove(0, getLength());
  51 + } catch (BadLocationException e) {
  52 + logger.error("Error clearing document: " + e.getLocalizedMessage());
  53 + }
  54 +
  55 + sentences = sents;
  56 +
  57 + posToWord = new ArrayList<Word>();
  58 + wordToStartPos = new HashMap<Word, Integer>();
  59 +
  60 + int pos = 0;
  61 + try {
  62 + for (Sentence s : sentences) {
  63 +
  64 + for (Clause c : s.getClauses()) {
  65 +
  66 + insertString(pos, "[ ", Styles.getHandleStyle());
  67 + pos += 2;
  68 + posToWord.add(null);
  69 + posToWord.add(null);
  70 +
  71 + Word prev = null;
  72 + for (Word w : c.getWords()) {
  73 + if (prev != null) {
  74 + insertString(pos, " ", Styles.getWhitespaceStyle());
  75 + pos += 1;
  76 + posToWord.add(prev);
  77 + }
  78 +
  79 + String orth = w.getOrth();
  80 + boolean selected = selectedWords != null && selectedWords.contains(w);
  81 + insertString(pos, orth, Styles.getWordStyle(w, selected));
  82 + int length = orth.length();
  83 + wordToStartPos.put(w, pos);
  84 + for (int i = 0; i < length; i++)
  85 + posToWord.add(w);
  86 + pos += length;
  87 +
  88 + prev = w;
  89 + }
  90 +
  91 + insertString(pos, " ]", Styles.getHandleStyle());
  92 + pos += 2;
  93 + posToWord.add(null);
  94 + posToWord.add(null);
  95 + }
  96 + insertString(pos, "\n\n", Styles.getWhitespaceStyle());
  97 + pos += 2;
  98 + posToWord.add(null);
  99 + posToWord.add(null);
  100 + }
  101 + // for last dot
  102 + posToWord.add(null);
  103 +
  104 + } catch (BadLocationException e) {
  105 + logger.error("Error setting document: " + e.getLocalizedMessage());
  106 + }
  107 +
  108 + ignoreCaretUpdate = false;
  109 + }
  110 +
  111 + public synchronized List<Sentence> getSentences() {
  112 + return sentences;
  113 + }
  114 +
  115 + public void caretUpdate(final CaretEvent e) {
  116 + if (ignoreCaretUpdate)
  117 + return;
  118 +
  119 + int dot = e.getDot();
  120 + int mark = e.getMark();
  121 + selectionOcurred(mark, dot);
  122 + }
  123 +
  124 + private synchronized void selectionOcurred(int mark, int dot) {
  125 +
  126 + if (posToWord == null)
  127 + return;
  128 +
  129 + Word startWord;
  130 + Word stopWord;
  131 + if (mark > dot) {
  132 + startWord = posToWord.get(dot);
  133 + stopWord = posToWord.get(mark);
  134 + } else {
  135 + startWord = posToWord.get(mark);
  136 + stopWord = posToWord.get(dot);
  137 + }
  138 +
  139 + if (startWord == null || stopWord == null) {
  140 + this.setSelectedWords(null, dot);
  141 + return;
  142 + }
  143 +
  144 + Clause clause1 = startWord.getClause();
  145 + Clause clause2 = stopWord.getClause();
  146 +
  147 + if (!clause1.equals(clause2)) {
  148 + this.setSelectedWords(null, dot);
  149 + return;
  150 + }
  151 +
  152 + List<Word> selectedSequence = clause1.getWordsSequence(startWord, stopWord);
  153 +
  154 + this.setSelectedWords(selectedSequence, dot);
  155 + }
  156 +
  157 + public synchronized void setSelectedWords(List<Word> selectedSequence, int mark) {
  158 +
  159 + if (wordToStartPos == null)
  160 + return;
  161 +
  162 + logger.debug("Setting selected words: " + selectedSequence);
  163 +
  164 + // remove previous selection
  165 + if (this.selectedWords != null) {
  166 + for (Word w : selectedWords) {
  167 + SimpleAttributeSet att = Styles.getWordStyle(w, false);
  168 + int start = wordToStartPos.get(w);
  169 + int len = w.toString().length();
  170 + this.setCharacterAttributes(start, len, att, true);
  171 + }
  172 + }
  173 +
  174 + // mark new selection
  175 + if (selectedSequence != null) {
  176 + for (Word w : selectedSequence) {
  177 + SimpleAttributeSet att = Styles.getWordStyle(w, true);
  178 + int start = wordToStartPos.get(w);
  179 + int len = w.toString().length();
  180 + this.setCharacterAttributes(start, len, att, true);
  181 + }
  182 + }
  183 +
  184 + this.selectedWords = selectedSequence;
  185 + this.selectedMarker = getMarkerFromSelection(selectedSequence);
  186 +
  187 + if (this.ignoreCaretUpdate) {
  188 + this.textPane.selectionChanged(selectedSequence, selectedMarker, mark);
  189 + } else {
  190 + this.ignoreCaretUpdate = true;
  191 + this.textPane.selectionChanged(selectedSequence, selectedMarker, mark);
  192 + this.ignoreCaretUpdate = false;
  193 + }
  194 +
  195 + }
  196 +
  197 + private Marker getMarkerFromSelection(List<Word> selectedSequence) {
  198 + if (selectedSequence == null)
  199 + return null;
  200 +
  201 + Marker m = null;
  202 + for (Word w : selectedSequence) {
  203 + if (w.getMarker() != null) {
  204 + if (m == null) {
  205 + m = w.getMarker();
  206 + } else if (!m.equals(w.getMarker())) {
  207 + m = null;
  208 + break;
  209 + }
  210 + }
  211 + }
  212 + return m;
  213 + }
  214 +
  215 + public synchronized Word getFirstSelectedWord() {
  216 + if (selectedWords == null)
  217 + return null;
  218 + return this.selectedWords.get(0);
  219 + }
  220 +
  221 + public synchronized int getFirstSelectedWordStartPos() {
  222 + Word firstSelectedWord = getFirstSelectedWord();
  223 + if (firstSelectedWord == null || wordToStartPos == null)
  224 + return 0;
  225 + return wordToStartPos.get(firstSelectedWord);
  226 + }
  227 +
  228 + public void keyTyped(KeyEvent e) {
  229 + }
  230 +
  231 + public void keyPressed(KeyEvent e) {
  232 + if (e.getKeyCode() == KeyEvent.VK_SHIFT) {
  233 + ignoreCaretUpdate = true;
  234 + }
  235 + }
  236 +
  237 + public void keyReleased(final KeyEvent e) {
  238 + if (e.getKeyCode() == KeyEvent.VK_ENTER) {
  239 + textPane.splitClause();
  240 + } else if (e.getKeyCode() == KeyEvent.VK_P) {
  241 + textPane.mergeClauseWithPrevious();
  242 + } else if (e.getKeyCode() == KeyEvent.VK_N) {
  243 + textPane.mergeClauseWithNext();
  244 + } else if (e.getKeyCode() == KeyEvent.VK_M) {
  245 + textPane.createMarker();
  246 + } else if (e.getKeyCode() == KeyEvent.VK_D) {
  247 + textPane.deleteMarker();
  248 + } else if (e.getKeyCode() == KeyEvent.VK_SHIFT) {
  249 + ignoreCaretUpdate = false;
  250 + Caret c = textPane.getCaret();
  251 + selectionOcurred(c.getDot(), c.getMark());
  252 + }
  253 + // } else if (e.getKeyCode() == KeyEvent.VK_S) {
  254 + // textPane.splitSentence();
  255 + // }
  256 +
  257 + }
  258 +
  259 + public synchronized List<Word> getSelectedWords() {
  260 + return this.selectedWords;
  261 + }
  262 +
  263 + public synchronized Marker getSelectedMarker() {
  264 + return this.selectedMarker;
  265 + }
  266 +
  267 + public synchronized void refreshCurrentMarkerStyle() {
  268 + if (selectedMarker == null || wordToStartPos == null)
  269 + return;
  270 +
  271 + for (Word w : selectedMarker.getWords()) {
  272 + boolean selected = false;
  273 + if (selectedWords.contains(w))
  274 + selected = true;
  275 +
  276 + SimpleAttributeSet att = Styles.getWordStyle(w, selected);
  277 + int start = wordToStartPos.get(w);
  278 + int len = w.toString().length();
  279 + this.setCharacterAttributes(start, len, att, true);
  280 + }
  281 + }
  282 +
  283 + public synchronized void refreshCurrentClauseStyle() {
  284 + if (selectedWords == null || wordToStartPos == null)
  285 + return;
  286 +
  287 + Clause c = selectedWords.get(0).getClause();
  288 +
  289 + for (Word w : c.getWords()) {
  290 + boolean selected = false;
  291 + if (selectedWords.contains(w))
  292 + selected = true;
  293 +
  294 + SimpleAttributeSet att = Styles.getWordStyle(w, selected);
  295 + int start = wordToStartPos.get(w);
  296 + int len = w.toString().length();
  297 + this.setCharacterAttributes(start, len, att, true);
  298 + }
  299 + }
  300 +
  301 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainSplitPanel.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainSplitPanel.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.util.List;
  5 +
  6 +import javax.swing.JScrollPane;
  7 +import javax.swing.JSplitPane;
  8 +
  9 +import org.apache.log4j.Logger;
  10 +
  11 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  12 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  13 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  14 +
  15 +public class MainSplitPanel extends JSplitPane {
  16 +
  17 + private static final long serialVersionUID = 3656861958564714263L;
  18 + private static final Logger logger = Logger.getLogger(MainSplitPanel.class);
  19 +
  20 + private Clauseannotator clauseannotator;
  21 +
  22 + private MainTextPane mainTextPane;
  23 + private BottomPanel bottomPanel;
  24 +
  25 + public MainSplitPanel(Clauseannotator clauseannotator) {
  26 + super(JSplitPane.VERTICAL_SPLIT);
  27 +
  28 + this.clauseannotator = clauseannotator;
  29 +
  30 + logger.info("Creating main panel...");
  31 +
  32 + mainTextPane = new MainTextPane(this);
  33 + bottomPanel = new BottomPanel(mainTextPane);
  34 +
  35 + this.setTopComponent(new JScrollPane(mainTextPane));
  36 + this.setBottomComponent(bottomPanel);
  37 + this.setOneTouchExpandable(true);
  38 + this.setDividerLocation(350);
  39 + }
  40 +
  41 + public void setSentences(final List<Sentence> sentences) {
  42 + mainTextPane.setSentences(sentences);
  43 + }
  44 +
  45 + public List<Sentence> getSentences() {
  46 + return mainTextPane.getSentences();
  47 + }
  48 +
  49 + public void selectionChanged(List<Word> selectedSequence, Marker m) {
  50 + bottomPanel.selectionChanged(selectedSequence, m);
  51 + }
  52 +
  53 + public void annotationChanged() {
  54 + this.clauseannotator.annotationChanged();
  55 + }
  56 +
  57 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainTextPane.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainTextPane.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.awt.Insets;
  5 +import java.util.List;
  6 +
  7 +import javax.swing.JTextPane;
  8 +
  9 +import org.apache.log4j.Logger;
  10 +
  11 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause;
  12 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker;
  13 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence;
  14 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  15 +
  16 +public class MainTextPane extends JTextPane {
  17 +
  18 + private static final long serialVersionUID = 3709902726162446568L;
  19 + private static final Logger logger = Logger.getLogger(MainTextPane.class);
  20 +
  21 + private MainSplitPanel mainSplitPanel;
  22 +
  23 + private MainDocument document;
  24 +
  25 + public MainTextPane(MainSplitPanel mainSplitPanel) {
  26 + super();
  27 +
  28 + this.mainSplitPanel = mainSplitPanel;
  29 + this.document = new MainDocument(this);
  30 +
  31 + this.setStyledDocument(document);
  32 + this.setMargin(new Insets(5, 5, 5, 5));
  33 + this.setEditable(false);
  34 +
  35 + this.addCaretListener(document);
  36 + this.addKeyListener(document);
  37 + }
  38 +
  39 + public void setSentences(List<Sentence> sentences) {
  40 + selectionChanged(null, null, 0);
  41 + document.setSentences(sentences);
  42 + this.setCaretPosition(0);
  43 + this.getCaret().setVisible(true);
  44 + }
  45 +
  46 + public List<Sentence> getSentences() {
  47 + return document.getSentences();
  48 + }
  49 +
  50 + public void selectionChanged(List<Word> selectedSequence, Marker m, int dot) {
  51 + this.select(dot, dot);
  52 + this.getCaret().setVisible(true);
  53 + mainSplitPanel.selectionChanged(selectedSequence, m);
  54 + }
  55 +
  56 + private void reloadSentences() {
  57 + document.setSentences(document.getSentences());
  58 + final int caretPos = document.getFirstSelectedWordStartPos();
  59 + this.select(caretPos, caretPos);
  60 + this.getCaret().setVisible(true);
  61 + this.mainSplitPanel.annotationChanged();
  62 + }
  63 +
  64 + private void reloadCurrentClause() {
  65 + document.refreshCurrentClauseStyle();
  66 + this.mainSplitPanel.annotationChanged();
  67 + }
  68 +
  69 + private void reloadCurrentMarker() {
  70 + document.refreshCurrentMarkerStyle();
  71 + this.mainSplitPanel.annotationChanged();
  72 + }
  73 +
  74 + /* ACTIONS */
  75 +
  76 + public synchronized void splitClause() {
  77 + Word selectedWord = document.getFirstSelectedWord();
  78 + if (selectedWord == null)
  79 + return;
  80 +
  81 + if (selectedWord.isFirstInClause())
  82 + return;
  83 +
  84 + if (selectedWord.isInMiddleOfMarker())
  85 + return;
  86 +
  87 + Clause c = selectedWord.getClause();
  88 + logger.info("Splitting clause: " + c + " starting from word: " + selectedWord);
  89 + Sentence s = c.getSentence();
  90 + s.splitClause(c, selectedWord);
  91 +
  92 + reloadSentences();
  93 + }
  94 +
  95 + public synchronized void mergeClauseWithPrevious() {
  96 + Word selectedWord = document.getFirstSelectedWord();
  97 + if (selectedWord == null)
  98 + return;
  99 + Clause c = selectedWord.getClause();
  100 +
  101 + if (c.isFirstInSentence())
  102 + return;
  103 +
  104 + logger.info("Merging clause: " + c + " into previous one");
  105 + Sentence s = c.getSentence();
  106 + s.mergeClauseWithPrevious(c);
  107 +
  108 + reloadSentences();
  109 + }
  110 +
  111 + public synchronized void mergeClauseWithNext() {
  112 + Word selectedWord = document.getFirstSelectedWord();
  113 + if (selectedWord == null)
  114 + return;
  115 + Clause c = selectedWord.getClause();
  116 +
  117 + if (c.isLastInSentence())
  118 + return;
  119 +
  120 + logger.info("Merging clause: " + c + " into next one");
  121 + Sentence s = c.getSentence();
  122 + s.mergeClauseWithNext(c);
  123 +
  124 + reloadSentences();
  125 + }
  126 +
  127 + public synchronized void setContinuingClause(Clause cont) {
  128 + Word selectedWord = document.getFirstSelectedWord();
  129 + if (selectedWord == null) {
  130 + logger.error("Trying to continiuing clause when no clause chosen!");
  131 + return;
  132 + }
  133 +
  134 + Clause c = selectedWord.getClause();
  135 + logger.info("Setting continiuing clause: " + cont + " for clause: " + c);
  136 + c.setContinuedClause(cont);
  137 +
  138 + reloadCurrentClause();
  139 + }
  140 +
  141 + public synchronized void createMarker() {
  142 + List<Word> selectedWords = document.getSelectedWords();
  143 + if (selectedWords == null)
  144 + return;
  145 +
  146 + for (Word w : selectedWords)
  147 + if (w.getMarker() != null)
  148 + return;
  149 +
  150 + logger.info("Creating new marker from words: " + selectedWords);
  151 + new Marker(selectedWords);
  152 +
  153 + reloadSentences();
  154 + }
  155 +
  156 + public synchronized void deleteMarker() {
  157 + Marker selectedMarker = document.getSelectedMarker();
  158 + if (selectedMarker == null)
  159 + return;
  160 +
  161 + logger.info("Deleting marker: " + selectedMarker);
  162 + selectedMarker.deleteMe();
  163 +
  164 + reloadSentences();
  165 + }
  166 +
  167 + public synchronized void setMarkerNUC(String nuc) {
  168 + Marker m = document.getSelectedMarker();
  169 + if (m == null) {
  170 + logger.error("Trying to set marker nuc when no marker chosen!");
  171 + return;
  172 + }
  173 +
  174 + logger.info("Setting nuc " + nuc + " for marker: " + m);
  175 + m.setNUC(nuc);
  176 +
  177 + reloadCurrentMarker();
  178 + }
  179 +
  180 + public void splitSentence() {
  181 + Word selectedWord = document.getFirstSelectedWord();
  182 + if (selectedWord == null)
  183 + return;
  184 +
  185 + if (selectedWord.isFirstInClause())
  186 + return;
  187 +
  188 + if (selectedWord.isInMiddleOfMarker())
  189 + return;
  190 +
  191 + Clause c = selectedWord.getClause();
  192 + Sentence s = c.getSentence();
  193 + logger.info("Splitting sentence: " + s + " starting from word: " + selectedWord);
  194 +
  195 + s.getDocument().splitSentence(s, selectedWord);
  196 +
  197 + reloadSentences();
  198 +
  199 + }
  200 +
  201 + public void setMarkerConnect(String connect) {
  202 + Marker m = document.getSelectedMarker();
  203 + if (m == null) {
  204 + logger.error("Trying to set marker connect when no marker chosen!");
  205 + return;
  206 + }
  207 +
  208 + logger.info("Setting connect " + connect + " for marker: " + m);
  209 + m.setConnect(connect);
  210 +
  211 + reloadCurrentMarker();
  212 + }
  213 +
  214 +}
... ...
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Styles.java 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Styles.java
  1 +package pl.waw.ipipan.zil.summarization.clauseannotator.main;
  2 +
  3 +
  4 +import java.awt.Color;
  5 +
  6 +import javax.swing.text.SimpleAttributeSet;
  7 +import javax.swing.text.StyleConstants;
  8 +
  9 +import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word;
  10 +
  11 +public class Styles {
  12 +
  13 + private static SimpleAttributeSet handleStyle;
  14 + private static SimpleAttributeSet whitespaceStyle;
  15 +
  16 + static {
  17 + handleStyle = new SimpleAttributeSet();
  18 + StyleConstants.setBold(handleStyle, true);
  19 +
  20 + whitespaceStyle = new SimpleAttributeSet();
  21 + }
  22 +
  23 + public static SimpleAttributeSet getWordStyle(Word w, boolean selected) {
  24 + SimpleAttributeSet defaultStyle = new SimpleAttributeSet();
  25 + if (w.getClause().getContinuedClause() != null)
  26 + StyleConstants.setBackground(defaultStyle, Color.getHSBColor(0.069f, 0.20f, 0.99f));
  27 +
  28 + if (w.getMarker() != null) {
  29 + StyleConstants.setUnderline(defaultStyle, true);
  30 + if (w.getMarker().getNUC().equals(""))
  31 + StyleConstants.setBackground(defaultStyle, Color.magenta);
  32 + }
  33 +
  34 + if (selected)
  35 + StyleConstants.setBackground(defaultStyle, Color.yellow);
  36 +
  37 + if (w.isVerb())
  38 + StyleConstants.setBold(defaultStyle, true);
  39 +
  40 + return defaultStyle;
  41 + }
  42 +
  43 + public static SimpleAttributeSet getHandleStyle() {
  44 + return handleStyle;
  45 + }
  46 +
  47 + public static SimpleAttributeSet getWhitespaceStyle() {
  48 + return whitespaceStyle;
  49 + }
  50 +
  51 +}
... ...
ClauseAnnotator/src/main/resources/help.html 0 → 100644
  1 +++ a/ClauseAnnotator/src/main/resources/help.html
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5 +<title>Help</title>
  6 +</head>
  7 +<body>
  8 +
  9 +<h2>General</h2>
  10 + <p>Clause boundaries are bordered with handles: "[" and "]".</p>
  11 + <p>Sentences are separated with empty lines.</p>
  12 + <p>Markers are <u>underlined</u>.</p>
  13 + <p>Verbs are <i>italic</i> (by default works for Polish only).
  14 + Verbs are identified by regular expression (with is compared to the pos tag of a word)
  15 + stored in the file <b>verb.regexp</b> inside the jar package.
  16 + Modify this file for your purposes using any
  17 + extraction tool.</p>
  18 +
  19 +<h2>Marker/Clause/Span selection</h2>
  20 + <p>When a span of text is selected, it's yellow. Program doesn't allow
  21 + to select a span in more than one clause. Automatically this span's
  22 + clause is selected. If the selected span contain only one marker (or part of a marker),
  23 + this marker is also selected. Current selected clause/marker are
  24 + displayed in the bottom panel. It's best to play with the program
  25 + to see how it selects them.</p>
  26 + <p>All clauses which have set a "continue" attribute are highlighted pink.</p>
  27 + <p>Markers which don't have set required attributes (arg1/2, type) are marked magenta.</p>
  28 +
  29 +<h2>Clause actions</h2>
  30 + <p>These are possible clause actions:</p>
  31 + <ul>
  32 + <li><b>Split clause into two</b> - select a single word or a span of words,
  33 + then press <b>ENTER</b> key on the keyboard. The clause is going to be split in two, beginning
  34 + from the first word selected. WARNING: System won't let you to split a marker into two clauses.
  35 + <li><b>Merge clause with <u>n</u>ext</b> - select clause, then press <b>N</b> key. Current clause
  36 + is going to be merged with the next one, if possible. All pointers to current clause are going
  37 + to be lost, all pointers to the next clause remain the same.
  38 + <li><b>Merge clause with <u>p</u>revious</b> - select clause, then press <b>P</b> key. Current clause
  39 + is going to be merged with the previous one, if possible. All pointers to current clause are going
  40 + to be lost, all pointers to the previous clause remain the same.
  41 + </ul>
  42 +
  43 +<h2>Marker actions</h2>
  44 + <p>These are possible marker actions:</p>
  45 + <ul>
  46 + <li><b>Create <u>m</u>arker</b> - select a span of words, then press <b>M</b> key on the keyboard.
  47 + Marker will be created from the selection.</li>
  48 + <li><b><u>D</u>elete marker</b> - select this marker,
  49 + then press key <b>D</b> on the keyboard.</li>
  50 + <li><b>Change marker NUC attribute</b> - select marker,
  51 + then select desired NUC in the bottom panel.
  52 + <li><b>Change marker CONNECT attribute</b> - select marker,
  53 + then select desired CONNECT in the bottom panel.
  54 + </ul>
  55 +</body>
  56 +</html>
0 57 \ No newline at end of file
... ...
ClauseAnnotator/target/classes/help.html 0 → 100644
  1 +++ a/ClauseAnnotator/target/classes/help.html
  1 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5 +<title>Help</title>
  6 +</head>
  7 +<body>
  8 +
  9 +<h2>General</h2>
  10 + <p>Clause boundaries are bordered with handles: "[" and "]".</p>
  11 + <p>Sentences are separated with empty lines.</p>
  12 + <p>Markers are <u>underlined</u>.</p>
  13 + <p>Verbs are <i>italic</i> (by default works for Polish only).
  14 + Verbs are identified by regular expression (with is compared to the pos tag of a word)
  15 + stored in the file <b>verb.regexp</b> inside the jar package.
  16 + Modify this file for your purposes using any
  17 + extraction tool.</p>
  18 +
  19 +<h2>Marker/Clause/Span selection</h2>
  20 + <p>When a span of text is selected, it's yellow. Program doesn't allow
  21 + to select a span in more than one clause. Automatically this span's
  22 + clause is selected. If the selected span contain only one marker (or part of a marker),
  23 + this marker is also selected. Current selected clause/marker are
  24 + displayed in the bottom panel. It's best to play with the program
  25 + to see how it selects them.</p>
  26 + <p>All clauses which have set a "continue" attribute are highlighted pink.</p>
  27 + <p>Markers which don't have set required attributes (arg1/2, type) are marked magenta.</p>
  28 +
  29 +<h2>Clause actions</h2>
  30 + <p>These are possible clause actions:</p>
  31 + <ul>
  32 + <li><b>Split clause into two</b> - select a single word or a span of words,
  33 + then press <b>ENTER</b> key on the keyboard. The clause is going to be split in two, beginning
  34 + from the first word selected. WARNING: System won't let you to split a marker into two clauses.
  35 + <li><b>Merge clause with <u>n</u>ext</b> - select clause, then press <b>N</b> key. Current clause
  36 + is going to be merged with the next one, if possible. All pointers to current clause are going
  37 + to be lost, all pointers to the next clause remain the same.
  38 + <li><b>Merge clause with <u>p</u>revious</b> - select clause, then press <b>P</b> key. Current clause
  39 + is going to be merged with the previous one, if possible. All pointers to current clause are going
  40 + to be lost, all pointers to the previous clause remain the same.
  41 + </ul>
  42 +
  43 +<h2>Marker actions</h2>
  44 + <p>These are possible marker actions:</p>
  45 + <ul>
  46 + <li><b>Create <u>m</u>arker</b> - select a span of words, then press <b>M</b> key on the keyboard.
  47 + Marker will be created from the selection.</li>
  48 + <li><b><u>D</u>elete marker</b> - select this marker,
  49 + then press key <b>D</b> on the keyboard.</li>
  50 + <li><b>Change marker NUC attribute</b> - select marker,
  51 + then select desired NUC in the bottom panel.
  52 + <li><b>Change marker CONNECT attribute</b> - select marker,
  53 + then select desired CONNECT in the bottom panel.
  54 + </ul>
  55 +</body>
  56 +</html>
0 57 \ No newline at end of file
... ...