Smalltalk Parcel TeSeT

Ein Tool zur Unterstützung von Termzuordnungen von Komposita

This table is an overview of classes implemented for TeSeT. The documentation of the classes describes briefly their purpose, lists the instance variables and gives a summary of the most important methods. Normally every instance variable has a "get" and a "set" method that are not included in the method summary.
Besides the Smalltalk class library some classes needed to run TeSeT (the most important ones are those needed for parsing and for direct communication with the BIXDatabase) were implemented by Lothar Rostek at Fraunhofer IPSI. These classes are not or just partly documented here.

Class summary
BIXLookUp The BIXLookUp class searches the BIX database
TSComment The TSComment class is a simple editor to write comments
TSCompound The TSCompound class holds diverse information about a compound and includes methods to manipulate this information
TSCompoundCollection The TSCompoundCollection class includes special methods to enumerate over TSCompounds
TSCompoundElement The TSCompoundElement class contains information about either the first or the second element of a TSCompound and includes methods to manipulate this information
TSExtraWindow The TSExtraWindow class is a read only editor that shows definitions of a selected term in the TSTool application
TSIcons The TSIcons class contains the source code for icons created for the TSTool GUI
TSLabelledTermText The TSLabelledTermText class holds a definition text from the BIX-Database
TSSearchWin The TSSearchWin class provides a GUI for a search in the BIX database
TSTextController The TSTextController class is an enhancement of ParagraphEditor that lets the focus shifting information come from the KeyboardProcessor
TSTool The TSTool class is the application model class of Term Selection Tool (TeSeT). It manages input and output files, communicates with the GUI, the compound module (including TSCompoundCollection, TSCompound and TSCompoundElement) and the database module (including BIXLookUp and TSLabelledTermText)
XSGMLStyleDescription The XSGMLStyledescription class includes style descriptions for div. XSGML files

Class BIXLookUp

BIXLookUp includes methods to get information from a BIX database.
The elements needed are a BIXLemma and a BIXTerm. The relevant structures of the database elements are as follows:

BIXLemma:
a ValueSet. ex: <FXL~ neu>
this ValueSet includes slots like:
#lemmaName: <'neu'>
#Terme: <FXT~ neu_5a, FXT~ neu_1, FXT~ neu_3a, FXT~ neu_2, FXT~ neu_4, FXT~ neu_3c, FXT~ neu_5c, FXT~ neu_5b, FXT~ neu_3b>
#lemmaID:<'FX_113544'>

BIXTerm:
a ValueSet. ex: <FXT~ neu_1>
this ValueSet includes slots like:
#lemma: <FXL~ neu>
#termID: <'FX_113544_T1'>
#termLabel: <'1'>
##Definition: <'erst vor kurzer Zeit hergestellt, noch nicht gebraucht'>
#Beispiel: <'das Auto ist [ziemlich] neu, sieht noch [wie] neu aus'', ''etw. auf neu herrichten (ugs.; so herrichten, dass es wieder wie neu aussieht)'', ''neu für alt (Kaufmannsspr.; Neues im Tausch gegen Altes)'', ... etc.


Class Method Summary
buildCollectionOfDefinitions: anOrderedCollection from: aBIXTerm
gets information from aBIXTerm and adds to anOrderedCollection
checkForNebenFormAt:aBIXLemma
returns aBIXLemma with its 'Nebenform' if any exists
collectTextFrom:aBIXTermOrTerms at:aSymbol label: anAssociation
returns an OrderedCollection of TSLabelledTermText with the text for aBIXTermOrTerms at aSymbol
extractLemmaIDsFrom: aString
returns an OrderedCollection of ids (as string) found at aString
getDefinitionAt: aString
returns a SortedCollection of TSLabelledTermText with def for aString
getExtraInfosAt: aString
returns a SortedCollection of TSLabelledTermText
getExtraInfosAt: aString label: anAssociation type: aSymbol
extracts extra infos from the BIXTerm at aString at aSymbol, labels it with anAssociation and returns a collection including these information
idNumberFor: aString
returns the id, which is included in aString, as a Number (integer)
labelArray
returns an array with the different labels for a definition text
termsFrom: aBIXLemma
returns all terms that belong to aBIXLemma

Class TSComment

TSComment is an application that allows a user of TSTool to add a working comment to a compound

Instance Variables:

commentText <ValueModel>
compound <TSCompound>
tsApplication <TSTool>
winLabel <String>


Method Summary
postBuildWith: aBuilder
opens the application window, labels it with compound and displays the comment of compound as commentText
saveComment
saves the commentText as String in the comment variable of compound

Class TSCompound

TSCompound holds diverse information about a compound and includes methods to manipulate this information.

Instance Variables:

comment <String> a comment about this compound or its working state
firstElem <TSCompoundElement> the first element of the compound
fugenelem <String> fugenelement is an element between the first and the second elements of the compound.
idCollection <SortedCollection> lemma ids belonging to this compound from the BIX-database
name <String> the compound itself as String
nrOfTerms <aString> tells how many different terms the compound represents
secondElem <TSCompoundElement> s. firstElem
showExtraInfos <Boolean> tells if more than the basic definitions should be displayed, e.g. examples or citations
state <String> a working state

Instance Method Summary
fillCompoundFrom: aLine
initializes self with aLine, which is a line from a compound file with all needed information
removeSelectedTerms
removes selected terms from both elements of self
writeCompoundOnStream: aStream
writes self (name and all relevant information) on aStream in table format
wrongFormatDialog: aLine
calls a dialog that tells the user that aLine does not match the format of a TeSeT table. The user has the possibility to continue with next line or stop reading the file.

Class TSCompoundCollection

TSCompoundCollection includes methods to enumerate over TSCompounds

Class Method Summary
collectionFromTabFile: aFile
returns a collection of lines from aFile
fromFile: aFile
if aFile includes a valid TeSeTTable, then this method returns self initialized with the contents of aFile. Else returns nil
initializeCompoundCollection: anOrderedCollection
returns self initialized with anOrderedCollection
isTeSetTable:aLine
returns true if aLine matches the format of a TeSeTTable

Class TSCompoundElement

TSCompoundElement is either the first or the second element of a TSCompound

Instance Variables:

idCollection <SortedCollection> the lemma ids of this element from the BIX-Database
name <String> the element (a word) as String
selectedTerm <StringOrNil> the id of a selected term for this element or nil if no term is selected
selectionStart <Integer> needed for displaying the definition of selectedTerm
selectionStop <Integer> s. selectionStart
showExtraInfos <Boolean> tells if more than the basic definitions should be displayed, e.g. examples or citations

Instance Method Summary
changeElementTo: aString
initializes self with the lemma represented by aString
hasSelectedTerm
returns true if selectedTerm is not nil

Class TSExtraWindow

TSExtraWindow is an application window that shows text from a text editor in the main window of TSTool

Instance Variables:

termInfosExtra <Text> the contents of the editor. This variable is initialized from an editor in TSTool
winLabel <String> the compound or the term to which the contents of the editor belong. This string is used as a window label

Class TSLabelledTermText

TSLabelledTermText holds a definition text from the BIX database. It is called a labelled text because the label tells, if the text is a definition, an example, a citation or something else. The text belongs to a single term, which id is also hold in this object. This class only contains "getters" and "setters" for the instance variables.

Instance Variables:

id <String> id of this object. Example: 'FX_118951_T1'
label <String> The last number of the id. Used for emphasising this number in the application window. Example: '1'
tag <String> the kind of text this object holds: definition, example, citation etc. Example: '(beisp) '
tagNumber <Integer> number of the tag. Used to sort the definitions later. Example: 5
termNumber <Integer> number of the term. Example: 1
text <String> the definition text itself. Example 'eine Rolle Papier; ein Fetzen Papier; [einen Bogen] Papier in die Maschine spannen; ein Blatt, Bogen, Stück Papier; weißes, buntes, weiches, raues, glattes, holzfreies, handgeschöpftes, [un]bedrucktes, vergilbtes, steifes, durchscheinendes, .... etc. '

Class TSSearch

TSSearch is an application that allows for a full search in the BIX database.

Instance Variables:

searchResult <text editor> a read only editor that shows search results
searchString <input field> holds the user input
showsExtraInfos <Boolean> tells if the searchResult shows extra information (like examples and citations) or not

Instance Method Summary
extraInfosForSearchTerm
searches for a lemma in the BIX database and shows the result including additional information (like examples or citations) in searchResult
searchForLemma
searches for a lemma in the BIX database represented by searchString and shows the result in searchResult

Class TSTextController

TSTextController is a TextEditorController with some modified methods for TSTool, so that selections in textEditor can be shown.

Instance Method Summary
redButtonPressedEvent: aMouseButtonEvent
shows selection that is done by a mouse click and sets start and stop indicies for the selection.
Calls TSTool>>changedSelectionFrom:

Class TSTool

TSTool is the application model class of Term Selection Tool (TeSeT). It manages input and output files, communicates with the GUI, the compound module (including TSCompoundCollection, TSCompound and TSCompoundElement) and the module that communicates with the database (including BIXLookUp and TSLabelledTermText)

Instance Variables:

compounds <TSCompoundCollection> all compounds read from an input file
coumpundsList <MultiSelectionInList> shows the names of all compounds with their working state icon bestimmungswort <ValueHolder> the value of bestimmungswort is the name of the first element of a compound
basiswort <ValueHolder> the value of bestimmungswort is the name of the second element of a compound
firstElementCandidates <ValueHolder> the value of the text editor that shows the possible definitions of the first element of a compound
secondElementCandidates <ValueHolder> the value of the text editor that shows the possible definitions of the second element of a compound
fugenelement <ValueHolder> the selected element of the fugenelement menu
definitionText <ValueHolder> the value of the text editor that shows the definitions of a compound
counter <ValueHolder> the selected element of the counter menu that showsworking state statistics
inputString <ValueHolder> the value of the input field where the user prints a search string
firstEditorView <TextEditorView> the editor view of the first element
secondEditorView <TextEditorView> the editor view of the second element
searchFrom <ValueHolder> the selected element of the searchFrom menu (tells if a search should search compounds or just either basiswort or bestimmungswort)
alphabetic <Boolean> is true if the compoundsList is sorted alphabetically
logfile <Filename> every change of a compound is written in this file
fileToSaveIn <Filename> if the user decides to save in file, here is where its written to

For the purpose of filtering the list of compounds, a number of CheckBoxes are found on the GUI. Their values (Booleans) are also held as instance variables in TSTool.

Class Method Summary
normalize: aString withTag: aTag
makes an SGML element from aString and returns the contents of a stream that contains this element normalized (as text), i.e. SGML entities are substituted with their values and some special mapping is done with XSGMLStyleDescription class>>bixStyleDictionary
setTextEditorValue: aStringOrCollection onStream: aStream
format the text of definitions included in aStringOrCollection and writes it on aStream. Returns aStream
Instance Method Summary
changeDivision
changes the division of a compound and gets new term-IDs for the elements
extraInfosCompound
toggles between showing extra information for a compound or not showing it, e.g. changes the value of the showExtraInfos variable of the selected compound
extraInfosFirstTerm
toggles between showing extra information for a compound element or not showing it
extraInfosSecondTerm
toggles between showing extra information for a compound element or not showing it
getFugenelement
finds the selected fugenelement in the fugenelement menu and returns its label (a String)
maybeSaveIfCancel: aBlock
if the page has unsaved changes, suggest the user to save them using the usual Yes-No-Cancel dialog. Answer a Boolean indicating whether it is OK to close the window
multiChangeFirstTerm
changes the first element of all selected compounds
multiChangeFugenelement
changes the fugenelement of all selected compounds
multiChangeSecondTerm
changes the second element of all selected compounds
openCommentWindow
opens a TSComment
searchForLemma
opens a TSSearch
showAllCompounds
shows all compounds at #compoundsList without a filter
showExtraWindowForCompDef
opens a TSExtraWindow to show big definition texts in a bigger editor
sortCompoundsAlphabetically
sorts compounds alphabetically and sets alphabetical to true
sortCompoundsSystematically
sorts the compounds list in the same way as in the input file, sets alphabetical to false
initializeCounter
initializes the counter menu with the states of all compounds, to show how many compounds have each state
openFile
after preparing the application for a new file (closing open file, if any, and refresh window), asks for a file to be opened, loads this file and sets the application's properties for start working on the new list of compounds
readLogFileAndRecover
updates compounds with contents of a log file
filterByTerm
updates compoundsList with all compounds that match the search criteria from the user
nothingFoundForElementMessage: aString
shows a 'not found' message for aString in its editor widget
setCandidatesValue: aTSCompoundElement at: aTextEditor
Gets the definitions for aTSCompoundElement and shows it in aTextEditor
setSelectionIndicesFor: aTSCompoundElement in: aTextEditor
sets the start and stop indices for a selected term of aTSCompoundElement. This is needed to show selection not only at a mouse click, but also to show saved selections of an element later
getDefinitions: IDs withExtras: aBoolean
returns definition texts of BIXTerms at IDs. If aBoolean is true, then this method also returns additional definition texts, like examples and citations
setAllTextEditorValuesFor: aTSCompound
sets text editor values for aTSCompound and its elements
recoverCompounds: aTSCompoundCollection
changes the properties of compounds in compoundsList according to the compounds in aTSCompoundCollection. Re-initializes counter and refreshes window
updateCompoundsList: aTSCompoundCollection
initializes compoundsList with aTSCompoundCollection. If aTSCompoundCollection is not identical with compounds, then shows coloured filter region
confirmOrChangeStartIndex: anIndex in: aString for: anotherString
aString represents a definition text whereas anotherString is an id of a definition. Returns anIndex if it is the right startIndex, otherwise returns a new index
acceptList
saves the compounds into fileToSaveIn
changedCompoundSelection
shows the right definitions for the new selected compound
changedSelectionFrom: aTSTextController
shows new definition selection and changes the properties of a selected compound according to this new selection. Writes in logFile

Class XSGMLStyleDescription

The class XSGMLStyleDescription includes style dictionaries. The one used for TeSeT is bixStyleDictionary which contains rules for converting the input XSGML data to the layout needed for TeSeT.

BIX Database

The BIX Database includes dictionary information about a large part of the german vocabulary. For an example of these information see class BIXLookUp