CDG
system on startup.This is the so called root module of the library with the following purpose:
CDG
system at startupAll other modules depend on this module and include cdg.h
Forward type definitions | |
This set of declarations help to deal with cirular C-structures which introduce circular header file dependencies as a consequence. All type definitions of that kind are moved to this place here to get a one-stop forward declaration. | |
typedef ChunkStruct * | Chunk |
typedef ChunkerStruct * | Chunker |
typedef ChunkerStruct | ChunkerStruct |
typedef ChunkStruct | ChunkStruct |
typedef GraphemNodeStruct * | GraphemNode |
typedef GraphemNodeStruct | GraphemNodeStruct |
typedef LexemNodeStruct * | LexemNode |
typedef LexemNodeStruct | LexemNodeStruct |
Defines | |
#define | FALSE 0 |
#define | max(a, b) (a) > (b) ? (a) : (b) |
#define | min(a, b) (a) < (b) ? (a) : (b) |
#define | NULL 0 |
#define | TRUE 1 |
Functions | |
void | cdgAgInsert (Agenda a, double score, Pointer state) |
void | cdgDeleteComputed (void) |
void | cdgExecPragmas (List pragmas) |
void | cdgFinalize (void) |
void | cdgFreeString (String str) |
void | cdgInitialize (void) |
Variables | |
Boolean | cdgCtrlCAllowed |
Boolean | cdgCtrlCAllowed = FALSE |
Boolean | cdgCtrlCTrapped |
Boolean | cdgCtrlCTrapped = FALSE |
Boolean | cdgEncodeUmlauts |
Boolean | cdgEncodeUmlauts = FALSE |
Hashtable | cdgNets |
Hashtable | cdgNets |
Hashtable | cdgParses |
Hashtable | cdgParses |
Hashtable | cdgProblems |
Hashtable | cdgProblems |
unsigned long | cdgTimeLimit |
unsigned long | cdgTimeLimit = 0 |
String | cdgUser |
String | cdgUser = NULL |
Boolean | cdgXCDG |
Boolean | cdgXCDG = FALSE |
|
|
maximum of Referenced by cnBuildFinal(), cnPrint(), cnPrintInfo(), comConstraintDepth(), comFormulaDepth(), comFunctionDepth(), comMaxLookupStrings(), comMaxLookupStringsInFormula(), comPredicateDepth(), comTermDepth(), and lgNewIter(). |
|
minimum of Referenced by cnPrint(), cnPrintInfo(), comIndent(), comOutdent(), and lgNewIter(). |
|
|
|
type of a chunk pointer Definition at line 237 of file cdg.h. Referenced by chunkerChunk(), chunkerChunkDelete(), chunkerCloneChunk(), chunkerReplaceGraphemes(), chunkerStringOfChunkType(), cmpChunks(), compareChunks(), countChunks(), embedChunk(), evalChunker(), evalTerm(), findChunk(), getChunks(), getFakeChunksAt(), lgCopyTagScores(), mergeChunk(), newChunk(), postProcessChunks(), and printChunk(). |
|
type of a chunker pointer Definition at line 231 of file cdg.h. Referenced by chunkerChunk(), chunkerDelete(), chunkerNew(), cmdChunk(), cmpChunks(), cnTag(), embedChunk(), evalChunker(), getChunks(), getFakeChunks(), getFakeChunksAt(), getFakeChunkType(), initChunker(), initFakeChunker(), initRealChunker(), mergeChunk(), parseGetCategory(), parseGetGrapheme(), parseGetLabel(), parseGetLevelValue(), parseGetModifiee(), parseGetRoots(), postProcessChunks(), and resetChunker(). |
|
type of a chunker structure Definition at line 228 of file cdg.h. |
|
type of a chunk structure Definition at line 234 of file cdg.h. |
|
type of a graphem node pointer Definition at line 249 of file cdg.h. Referenced by chunkerChunk(), cmdDistance(), cmpGraphemes(), cnBuildIter(), cnBuildLevelValues(), cnBuildNodes(), cnBuildTriple(), cnBuildUpdateArcs(), cnGetGraphemNodeFromArc(), cnOptimizeNode(), computeNoOfPathsFromStart(), computeNoOfPathsToEnd(), findGrapheme(), getCategories(), getCategory(), getChunks(), getFakeChunksAt(), gnClone(), lgAreDeletableNodes(), lgClone(), lgComputeDistances(), lgComputeNoOfPaths(), lgContains(), lgCopyTagScores(), lgDelete(), lgIsEndNode(), lgIsStartNode(), lgMayModify(), lgMostProbablePath(), lgNewIter(), lgPartitions(), lgQueryCat(), parseGetGrapheme(), and printChunk(). |
|
type of a graphem node structure Definition at line 246 of file cdg.h. |
|
type of a lexem node pointer Definition at line 243 of file cdg.h. Referenced by cmdDistance(), cnBuildNodes(), cnOptimizeNode(), cnPrintNode(), cnRenew(), cvAnalyse(), evalFormula(), evalTerm(), getCategories(), lgAreDeletableNodes(), lgAreDeletedNodes(), lgClone(), lgCompatibleNodes(), lgCompatibleSets(), lgComputeNoOfPaths(), lgCopySelection(), lgCopyTagScores(), lgDelete(), lgDeleteNode(), lgDeleteNodes(), lgDistanceOfNodes(), lgForbiddenBy(), lgIntersectingSets(), lgIsDeletedNode(), lgLexemeInLexemNodeList(), lgMakePath(), lgMayModify(), lgMember(), lgMostProbablePath(), lgNewIter(), lgOverlap(), lgPartitions(), lgPrint(), lgPrintNode(), lgQueryCat(), lgRequireLexeme(), lgRequireLexemes(), lgSimultaneous(), lgSubset(), lgWidth(), and parseGetCategory(). |
|
type of a lexem node structure Definition at line 240 of file cdg.h. |
|
helper function for agInsert. This function calls agInsert and emits truncation warnings using the cdgPrintf mechanism. Definition at line 140 of file cdg.c. References CDG_WARNING, and cdgPrintf(). |
|
Delete all existing constraint nets, parses and problems. This should always be used after changing the constraint grammar in any way, because there is no guarantee that the previously computed structures still make sense with the new grammar defnition. A constraint net might contain an LV that used to be allowed, but is now forbidden by a unary hard constraint so that it would not have been built at all under the new regime. Conversely, if the constraint that forbade building a particular LV were turned off, an existing constraint net would become incomplete, and solving it could miss a solution that would be possible under the new conditions. Definition at line 246 of file cdg.c. References CDG_INFO, cdgExecHook(), cdgNets, cdgParses, cdgPrintf(), cdgProblems, cnDelete(), cnMostRecentlyCreatedNet, ConstraintNet, HOOK_RESET, and NULL. Referenced by cdgFinalize(), cmdActivate(), cmdDeactivate(), cmdLoad(), cmdReset(), cmdUseconstraint(), and cmdUselevel(). |
|
Execute all #pragma commands seen during last load operation. The #pragma commands are stored in the input as they are seen during parsing, but they are not executed until after the load. There are two reasons for this: 1. a #pragma can refer to structures that are loaded from the same file as the #pragma -- so executing it immediately would be too early. 2. if a load operation fails, it should not affect the state of the program at all. Definition at line 309 of file cdg.c. References commandEval(), and NULL. Referenced by cmdLoad(). |
|
finalize the References cdgDeleteComputed(), cdgFreeString(), cdgUser, comFinalize(), dbFinalize(), evalFinalize(), and hkFinalize(). |
|
wrapper for strDelete This function is our wrapper arround the strDelete() of the blah lib. By default this is a NOP, that is: we don't call strDelete(). You might switch on the call to strDelete() at compile time, if you are brave enuf and wanna help to debug string programming. Definition at line 127 of file cdg.c. Referenced by cdgFinalize(), chunkerCommandValidate(), cnDelete(), comFree(), comMakeInfoFree(), commandEval(), evalFinalize(), getChunks(), interface_completion(), and resetChunker(). |
|
system initialization. This is the initialization of the root module that initializes all other modules containing an initialization callback. It is absolutely necessary to call this function before starting to use the References cdgEncodeUmlauts, cdgNets, cdgParses, cdgProblems, cdgTimeLimit, cdgUser, chunkerInitialize(), cnInitialize(), comInitialize(), dbInitialize(), evalInitialize(), hkInitialize(), lgInitialize(), NULL, scInitialize(), and timerInitialize(). |
|
allow a ctrl-c event. This flag is used to allow the signal handler to indicate a ctrl-c event. If TRUE the signal handler will set cdgCtrlCTrapped, if FALSE it will not. Definition at line 84 of file cdg.c. Referenced by cmdAnno2Parse(), cmdAnnotation(), cmdChunk(), cmdCompareParses(), cmdFrobbing(), cmdHierarchy(), cmdIncrementalCompletion(), cmdISearch(), cmdLexicon(), cmdNet(), cmdNetsearch(), cmdNewnet(), cmdPrintParse(), cmdPrintParses(), cmdShift(), cmdWordgraph(), cmdWriteNet(), cmdWriteParses(), cmdWriteWordgraph(), cnBuildFinal(), and comApprove(). |
|
allow a ctrl-c event. This flag is used to allow the signal handler to indicate a ctrl-c event. If TRUE the signal handler will set cdgCtrlCTrapped, if FALSE it will not. Definition at line 84 of file cdg.c. Referenced by cmdAnno2Parse(), cmdAnnotation(), cmdChunk(), cmdCompareParses(), cmdFrobbing(), cmdHierarchy(), cmdIncrementalCompletion(), cmdISearch(), cmdLexicon(), cmdNet(), cmdNetsearch(), cmdNewnet(), cmdPrintParse(), cmdPrintParses(), cmdShift(), cmdWordgraph(), cmdWriteNet(), cmdWriteParses(), cmdWriteWordgraph(), cnBuildFinal(), and comApprove(). |
|
indicator flag set by the signal handler of ctrl-c. If cdgCtrlCAllowed is TRUE and the user presses ctrl-c the flag Referenced by cmdAnno2Parse(), cmdAnnotation(), cmdChunk(), cmdCompareParses(), cmdFrobbing(), cmdHierarchy(), cmdIncrementalCompletion(), cmdISearch(), cmdLexicon(), cmdNet(), cmdNetsearch(), cmdNewnet(), cmdPrintParse(), cmdPrintParses(), cmdShift(), cmdWordgraph(), cmdWriteNet(), cmdWriteParses(), cmdWriteWordgraph(), cnBuild(), cnBuildEdges(), cnBuildFinal(), cnBuildIter(), cnPrint(), comApprove(), comCompareAllLvPairs(), comCompareAllLvs(), and comCompareWithContext(). |
|
indicator flag set by the signal handler of ctrl-c. If cdgCtrlCAllowed is TRUE and the user presses ctrl-c the flag Referenced by cmdAnno2Parse(), cmdAnnotation(), cmdChunk(), cmdCompareParses(), cmdFrobbing(), cmdHierarchy(), cmdIncrementalCompletion(), cmdISearch(), cmdLexicon(), cmdNet(), cmdNetsearch(), cmdNewnet(), cmdPrintParse(), cmdPrintParses(), cmdShift(), cmdWordgraph(), cmdWriteNet(), cmdWriteParses(), cmdWriteWordgraph(), cnBuild(), cnBuildEdges(), cnBuildFinal(), cnBuildIter(), cnPrint(), comApprove(), comCompareAllLvPairs(), comCompareAllLvs(), and comCompareWithContext(). |
|
If set, pseudo-umlaut sequences typed into the CDG shell will be turned into real 8bit umlauts: "a ==> ä Definition at line 103 of file cdg.c. Referenced by cdgInitialize(). |
|
If set, pseudo-umlaut sequences typed into the CDG shell will be turned into real 8bit umlauts: "a ==> ä Definition at line 103 of file cdg.c. Referenced by cdgInitialize(). |
|
all existing ConstraintNets Definition at line 112 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), cmdEdges(), cmdISearch(), cmdNet(), cmdNetdelete(), cmdNetsearch(), cmdNewnet(), cmdStatus(), cmdWriteAnno(), cmdWriteNet(), cnFindNet(), comApprove(), and net_completion_function(). |
|
all existing ConstraintNets Definition at line 112 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), cmdEdges(), cmdISearch(), cmdNet(), cmdNetdelete(), cmdNetsearch(), cmdNewnet(), cmdStatus(), cmdWriteAnno(), cmdWriteNet(), cnFindNet(), comApprove(), and net_completion_function(). |
|
all existing Parses Definition at line 113 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), cmdCompareParses(), cmdParsedelete(), cmdParses2prolog(), cmdPrintParse(), cmdStatus(), and parse_completion_function(). |
|
all existing Parses Definition at line 113 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), cmdCompareParses(), cmdParsedelete(), cmdParses2prolog(), cmdPrintParse(), cmdStatus(), and parse_completion_function(). |
|
all existing Problems Definition at line 114 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), and cmdNetdelete(). |
|
all existing Problems Definition at line 114 of file cdg.c. Referenced by cdgDeleteComputed(), cdgInitialize(), and cmdNetdelete(). |
|
time limit in milliseconds used by netsearch, frobbing and gls. The value of Referenced by cdgInitialize(), cmdFrobbing(), and cmdShift(). |
|
time limit in milliseconds used by netsearch, frobbing and gls. The value of Referenced by cdgInitialize(), cmdFrobbing(), and cmdShift(). |
|
user name currently running the Referenced by cdgFinalize(), and cdgInitialize(). |
|
user name currently running the Referenced by cdgFinalize(), and cdgInitialize(). |
|
xcdg indicator flag. If TRUE we're running under XCDG. Definition at line 90 of file cdg.c. Referenced by cnBuildEdges(), and getNextArgument(). |
|
xcdg indicator flag. If TRUE we're running under XCDG. Definition at line 90 of file cdg.c. Referenced by cnBuildEdges(), and getNextArgument(). |