4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.Linearizer Class Reference

Utility functions for document linearization. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.Linearizer:
Collaboration graph

Static Public Member Functions

static ArrayList< ArrayList
< Fragment > > 
linFragmentsToFragments (ArrayList< Fragment > linFragments, Document doc, ArrayList< ArrayList< Fragment >> badFragments)
 
static ArrayList< ArrayList
< SuggestionFragment > > 
linSugFragmentsToFragments (ArrayList< SuggestionFragment > linFragments, Document doc, ArrayList< ArrayList< SuggestionFragment >> badFragments)
 
static ArrayList< ArrayList
< AlternativeFragment > > 
linAltFragmentsToFragments (ArrayList< AlternativeFragment > linFragments, Document doc, ArrayList< ArrayList< AlternativeFragment >> badFragments)
 
static String linearizeDocument (Document doc)
 
static ArrayList
< SuggestionFragment
fragmentsToLinSugFragments (ArrayList< ArrayList< SuggestionFragment >> comFragments, Document doc, ArrayList< ArrayList< SuggestionFragment >> notConverted, boolean addSpaces)
 
static ArrayList< FragmentfragmentsToLinFragments (ArrayList< ArrayList< Fragment >> comFragments, Document doc, ArrayList< ArrayList< Fragment >> notConverted, boolean addSpaces)
 
static ArrayList
< AlternativeFragment
fragmentsToLinAltFragments (ArrayList< ArrayList< AlternativeFragment >> comFragments, Document doc, ArrayList< ArrayList< AlternativeFragment >> notConverted, boolean addSpaces)
 
static String linearizeDocumentFragment (DocumentFragment docFr, Document doc)
 
static ArrayList
< TextModification
modificationsToLinMod (ArrayList< TextModification > comModifications, Document doc, ArrayList< TextModification > notConverted) throws ParserConfigurationException, SAXException, IOException
 

Static Private Attributes

static MatcherProvider matcherProvider
 

Detailed Description

Utility functions for document linearization.

This class contains utility functions for document linearization.

Author
idytrych

Definition at line 40 of file Linearizer.java.

Member Function Documentation

static ArrayList<AlternativeFragment> cz.vutbr.fit.knot.annotations.comet.Linearizer.fragmentsToLinAltFragments ( ArrayList< ArrayList< AlternativeFragment >>  comFragments,
Document  doc,
ArrayList< ArrayList< AlternativeFragment >>  notConverted,
boolean  addSpaces 
)
static

Convert list of common fragments to linearized fragments. For more common fragments one linearized fragment can be created.

Parameters
comFragmentsList of common fragments.
docDocument in which fragments are
notConvertedList for fragments, which was not converted
addSpacesIf true, it will add space after each node (offset will be incremented by 1)
Returns
Returns list of linearized fragments

Definition at line 947 of file Linearizer.java.

Here is the call graph for this function:

static ArrayList<Fragment> cz.vutbr.fit.knot.annotations.comet.Linearizer.fragmentsToLinFragments ( ArrayList< ArrayList< Fragment >>  comFragments,
Document  doc,
ArrayList< ArrayList< Fragment >>  notConverted,
boolean  addSpaces 
)
static

Convert list of common fragments to linearized fragments. For more common fragments one linearized fragment can be created.

Parameters
comFragmentsList of common fragments.
docDocument in which fragments are
notConvertedList for fragments, which was not converted
addSpacesIf true, it will add space after each node (offset will be incremented by 1)
Returns
Returns list of linearized fragments

Definition at line 729 of file Linearizer.java.

Here is the call graph for this function:

static ArrayList<SuggestionFragment> cz.vutbr.fit.knot.annotations.comet.Linearizer.fragmentsToLinSugFragments ( ArrayList< ArrayList< SuggestionFragment >>  comFragments,
Document  doc,
ArrayList< ArrayList< SuggestionFragment >>  notConverted,
boolean  addSpaces 
)
static

Convert list of common fragments to linearized fragments. For more common fragments one linearized fragment can be created.

Parameters
comFragmentsList of common fragments.
docDocument in which fragments are
notConvertedList for fragments, which was not converted
addSpacesIf true, it will add space after each node (offset will be incremented by 1)
Returns
Returns list of linearized fragments

Definition at line 511 of file Linearizer.java.

Here is the call graph for this function:

static ArrayList<ArrayList<AlternativeFragment> > cz.vutbr.fit.knot.annotations.comet.Linearizer.linAltFragmentsToFragments ( ArrayList< AlternativeFragment linFragments,
Document  doc,
ArrayList< ArrayList< AlternativeFragment >>  badFragments 
)
static

Convert list of linearized fragments to common fragments. For each linearized fragment more common fragments can be created.

Parameters
linFragmentsList of linearized fragments. Fragments must be sorted by offset!
docDocument in which fragments are
badFragmentsList to which bad fragments will be stored
Returns
Returns list of lists of common fragments

Definition at line 331 of file Linearizer.java.

Here is the call graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.Linearizer.linearizeDocument ( Document  doc)
static

Linearizes document to string

Parameters
docDocument to linearize
Returns
Returns linearized document in string

Definition at line 468 of file Linearizer.java.

static String cz.vutbr.fit.knot.annotations.comet.Linearizer.linearizeDocumentFragment ( DocumentFragment  docFr,
Document  doc 
)
static

Linearizes fragment of document to string

Parameters
docFrFragment of document to linearize
docWhole document with nodes
Returns
Returns linearized fragment of document in string

Definition at line 1163 of file Linearizer.java.

Here is the caller graph for this function:

static ArrayList<ArrayList<Fragment> > cz.vutbr.fit.knot.annotations.comet.Linearizer.linFragmentsToFragments ( ArrayList< Fragment linFragments,
Document  doc,
ArrayList< ArrayList< Fragment >>  badFragments 
)
static

Convert list of linearized fragments to common fragments. For each linearized fragment more common fragments can be created.

Parameters
linFragmentsList of linearized fragments. Fragments must be sorted by offset!
docDocument in which fragments are
badFragmentsList to which bad fragments will be stored
Returns
Returns list of lists of common fragments

Definition at line 57 of file Linearizer.java.

Here is the call graph for this function:

static ArrayList<ArrayList<SuggestionFragment> > cz.vutbr.fit.knot.annotations.comet.Linearizer.linSugFragmentsToFragments ( ArrayList< SuggestionFragment linFragments,
Document  doc,
ArrayList< ArrayList< SuggestionFragment >>  badFragments 
)
static

Convert list of linearized fragments to common fragments. For each linearized fragment more common fragments can be created.

Parameters
linFragmentsList of linearized fragments. Fragments must be sorted by offset!
docDocument in which fragments are
badFragmentsList to which bad fragments will be stored
Returns
Returns list of lists of common fragments

Definition at line 190 of file Linearizer.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static ArrayList<TextModification> cz.vutbr.fit.knot.annotations.comet.Linearizer.modificationsToLinMod ( ArrayList< TextModification comModifications,
Document  doc,
ArrayList< TextModification notConverted 
) throws ParserConfigurationException, SAXException, IOException
static

Convert list of text modifications to linearized modifications. For more common modifications one linearized modification can be created.

Parameters
comModificationsList of common modifications.
docDocument in which modifications are
notConvertedModifications, which was not converted
Returns
Returns list of linearized modifications

Definition at line 1201 of file Linearizer.java.

Here is the call graph for this function:

Member Data Documentation

MatcherProvider cz.vutbr.fit.knot.annotations.comet.Linearizer.matcherProvider
staticprivate

Matcher provider for linearizing of fragments

Definition at line 45 of file Linearizer.java.


The documentation for this class was generated from the following file: