|
CWB
|
#include "../cl/globals.h"#include "../cl/corpus.h"#include "../cl/attributes.h"#include "../cl/endian.h"#include "../cl/fileutils.h"Functions | |
| int | component_ok (Attribute *attr, ComponentID cid) |
| Checks whether a component has already been created. More... | |
| void | makeall_make_component (Attribute *attr, ComponentID cid) |
| Creates a component for the specified attribute. More... | |
| int | validate_revcorp (Attribute *attr) |
| Validates the REVCORP component of the given attribute. More... | |
| void | makeall_do_attribute (Attribute *attr, ComponentID cid, int validate) |
| Create a given component (or all components) for an attribute. More... | |
| void | makeall_usage (void) |
| Prints a usage message and exits the program. More... | |
| int | main (int argc, char **argv) |
| Main function for cwb-makeall. More... | |
Variables | |
| Corpus * | corpus |
| The corpus we are working on. More... | |
| char * | progname = NULL |
| Name of this program. More... | |
| int component_ok | ( | Attribute * | attr, |
| ComponentID | cid | ||
| ) |
Checks whether a component has already been created.
| attr | The attribute of the component to check. |
| cid | The component ID of the component to check. |
References component_state(), ComponentDefined, ComponentLoaded, and ComponentUnloaded.
Referenced by makeall_do_attribute(), and makeall_make_component().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Main function for cwb-makeall.
| argc | Number of command-line arguments. |
| argv | Command-line arguments. |
References _Attribute::any, ATT_POS, TCorpus::attributes, central_corpus_directory, cl_new_attribute, cl_new_corpus(), cl_set_debug_level(), cl_set_memory_limit(), CompDirectory, CompLast, component_id(), corpus_id, drop_component(), makeall_do_attribute(), makeall_usage(), progname, TCorpus::registry_dir, registry_directory, and _Attribute::type.
| void makeall_do_attribute | ( | Attribute * | attr, |
| ComponentID | cid, | ||
| int | validate | ||
| ) |
Create a given component (or all components) for an attribute.
| attr | The attribute to work on. |
| cid | If this is CompLast, all components will be created. Otherwise, it specifies the single component that will be created. |
| validate | boolean - if true, validate_revcorp is called to check the resulting revcorp. |
References _Attribute::any, cid_name(), CompCompRF, CompCompRFX, CompCorpus, CompCorpusFreqs, CompHuffCodes, CompHuffSeq, CompHuffSync, CompLast, CompLexicon, CompLexiconIdx, CompLexiconSrt, component_ok(), CompRevCorpus, CompRevCorpusIdx, is_directory(), makeall_make_component(), and validate_revcorp().
Referenced by main().
| void makeall_make_component | ( | Attribute * | attr, |
| ComponentID | cid | ||
| ) |
Creates a component for the specified attribute.
This function will create the component if it doesn't already exist; it aborts on error.
| attr | The attribute of the component to create. |
| cid | The component ID of the component to create. |
References cid_name(), component_ok(), component_state(), ComponentLoaded, ComponentUnloaded, and create_component().
Referenced by makeall_do_attribute().
| void makeall_usage | ( | void | ) |
| int validate_revcorp | ( | Attribute * | attr | ) |
Validates the REVCORP component of the given attribute.
This function validates a REVCORP (i.e. an uncompressed index). It assumes that a lexicon, frequencies and (compressed or uncompressed) token stream are available for CL access for the given attribute.
| attr | The attribute whose REVCORP should be checked. |
References cid_name(), cl_calloc(), cl_cpos2id(), cl_free, cl_id2freq(), cl_max_cpos(), cl_max_id(), CompRevCorpus, TMblob::data, TComponent::data, ensure_component(), and TComponent::size.
Referenced by makeall_do_attribute().
| Corpus* corpus |
The corpus we are working on.
| char* progname = NULL |
Name of this program.
Referenced by main(), and makeall_usage().
1.8.8