#include "../cl/globals.h"
#include "../cl/corpus.h"
#include "../cl/attributes.h"
#include "../cl/macros.h"
int main | ( | int | argc, | |
char ** | argv | |||
) |
Main function for cwb-describe-corpus.
Prints information about an indexed corpus to STDOUT.
argc | Number of command-line arguments. | |
argv | Command-line arguments. |
References corpus, describe_corpus(), drop_corpus(), progname, registry, setup_corpus(), show_basic_info(), show_statistics(), and usage().
void show_attribute_names | ( | Corpus * | corpus, | |
int | type | |||
) |
Prints the names of attributes in a corpus to STDOUT.
Only one type of attribute is analysed.
corpus | The corpus to analyse. | |
type | The type of attribute to show. This should be one of the constants in cl.h (ATT_POS etc.) |
References _Attribute::any, TCorpus::attributes, print_indented_list_item(), and start_indented_list().
Referenced by show_basic_info().
void show_basic_info | ( | Corpus * | corpus, | |
int | with_attribute_names | |||
) |
Prints basic information about a corpus to STDOUT.
corpus | The corpus to report on. | |
with_attribute_names | Boolean: iff true, the counts of each type of attribute are followed by a list of attribute names. |
References _Attribute::any, ATT_ALIGN, ATT_POS, ATT_STRUC, TCorpus::attributes, cl_max_cpos, cl_new_attribute, TCorpus::info_file, TCorpus::name, TCorpus::path, TCorpus::registry_dir, TCorpus::registry_name, show_attribute_names(), and word.
Referenced by main().
void show_statistics | ( | Corpus * | corpus | ) |
Prints statistical information about a corpus to STDOUT.
Each corpus attribute gets info printed about it: tokens and types for a P-attribute, number of instances of regions for an S-attribute, number of alignment blocks for an A-attribute.
corpus | The corpus to analyse. |
References _Attribute::any, ATT_ALIGN, ATT_POS, ATT_STRUC, TCorpus::attributes, cl_has_extended_alignment(), cl_max_alg(), cl_max_cpos, cl_max_id, cl_max_struc(), and cl_struc_values.
Referenced by main().
void usage | ( | void | ) |
Prints a message describing how to use the program to STDERR and then exits.
References progname.
char* progname = NULL |
String set to the name of this program.