CWB
|
#include "../cl/globals.h"
#include "../cl/corpus.h"
#include "../cl/attributes.h"
#include "../cl/macros.h"
void describecorpus_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 describecorpus_show_basic_info().
void describecorpus_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, describecorpus_show_attribute_names(), TCorpus::info_file, TCorpus::name, TCorpus::path, TCorpus::registry_dir, TCorpus::registry_name, and word.
Referenced by main().
void describecorpus_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 describecorpus_usage | ( | void | ) |
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 cl_delete_corpus(), cl_new_corpus(), corpus, describe_corpus(), describecorpus_show_basic_info(), describecorpus_show_statistics(), describecorpus_usage(), progname, and registry.
char* progname = NULL |
String set to the name of this program.