/usr/include/link-grammar/link-includes.h is in liblink-grammar4-dev 4.7.4-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | /*************************************************************************/
/* Copyright (c) 2004 */
/* Daniel Sleator, David Temperley, and John Lafferty */
/* All rights reserved */
/* */
/* Use of the link grammar parsing system is subject to the terms of the */
/* license set forth in the LICENSE file included with this software, */
/* and also available at http://www.link.cs.cmu.edu/link/license.html */
/* This license allows free redistribution and use in source and binary */
/* forms, with or without modification, subject to certain conditions. */
/* */
/*************************************************************************/
#ifndef _LINKINCLUDESH_
#define _LINKINCLUDESH_
#include <link-grammar/link-features.h>
LINK_BEGIN_DECLS
/**********************************************************************
*
* System initialization
*
***********************************************************************/
typedef struct Dictionary_s * Dictionary;
link_public_api(const char *)
linkgrammar_get_version(void);
link_public_api(const char *)
linkgrammar_get_dict_version(Dictionary);
/**********************************************************************
*
* Functions to manipulate Dictionaries
*
***********************************************************************/
link_public_api(Dictionary)
dictionary_create(const char * dict_name,
const char * pp_name,
const char * cons_name,
const char * affix_name);
link_public_api(Dictionary)
dictionary_create_lang(const char * lang);
link_public_api(Dictionary)
dictionary_create_default_lang(void);
link_public_api(int)
dictionary_delete(Dictionary dict);
link_public_api(int)
dictionary_get_max_cost(Dictionary dict);
link_public_api(void)
dictionary_set_data_dir(const char * path);
link_public_api(char *)
dictionary_get_data_dir(void);
link_public_api(int)
dictionary_is_past_tense_form(Dictionary dict, const char * str);
link_public_api(int)
dictionary_is_entity(Dictionary dict, const char * str);
/**********************************************************************
*
* Functions to manipulate Parse Options
*
***********************************************************************/
typedef struct Parse_Options_s * Parse_Options;
link_public_api(Parse_Options)
parse_options_create(void);
link_public_api(int)
parse_options_delete(Parse_Options opts);
link_public_api(void)
parse_options_set_verbosity(Parse_Options opts, int verbosity);
link_public_api(int)
parse_options_get_verbosity(Parse_Options opts);
link_public_api(void)
parse_options_set_linkage_limit(Parse_Options opts, int linkage_limit);
link_public_api(int)
parse_options_get_linkage_limit(Parse_Options opts);
link_public_api(void)
parse_options_set_disjunct_cost(Parse_Options opts, int disjunct_cost);
link_public_api(void)
parse_options_set_disjunct_costf(Parse_Options opts, float disjunct_cost);
link_public_api(int)
parse_options_get_disjunct_cost(Parse_Options opts);
link_public_api(float)
parse_options_get_disjunct_costf(Parse_Options opts);
link_public_api(void)
parse_options_set_min_null_count(Parse_Options opts, int null_count);
link_public_api(int)
parse_options_get_min_null_count(Parse_Options opts);
link_public_api(void)
parse_options_set_max_null_count(Parse_Options opts, int null_count);
link_public_api(int)
parse_options_get_max_null_count(Parse_Options opts);
link_public_api(void)
parse_options_set_null_block(Parse_Options opts, int null_block);
link_public_api(int)
parse_options_get_null_block(Parse_Options opts);
link_public_api(void)
parse_options_set_islands_ok(Parse_Options opts, int islands_ok);
link_public_api(int)
parse_options_get_islands_ok(Parse_Options opts);
link_public_api(void)
parse_options_set_spell_guess(Parse_Options opts, int spell_guess);
link_public_api(int)
parse_options_get_spell_guess(Parse_Options opts);
link_public_api(void)
parse_options_set_short_length(Parse_Options opts, int short_length);
link_public_api(int)
parse_options_get_short_length(Parse_Options opts);
link_public_api(void)
parse_options_set_max_memory(Parse_Options opts, int mem);
link_public_api(int)
parse_options_get_max_memory(Parse_Options opts);
link_public_api(void)
parse_options_set_max_sentence_length(Parse_Options opts, int len);
link_public_api(int)
parse_options_get_max_sentence_length(Parse_Options opts);
link_public_api(void)
parse_options_set_max_parse_time(Parse_Options opts, int secs);
link_public_api(int)
parse_options_get_max_parse_time(Parse_Options opts);
link_public_api(void)
parse_options_set_cost_model_type(Parse_Options opts, int cm);
link_public_api(int)
parse_options_get_cost_model_type(Parse_Options opts);
link_public_api(void)
parse_options_set_use_fat_links(Parse_Options opts, int use_fat_links);
link_public_api(int)
parse_options_get_use_fat_links(Parse_Options opts);
link_public_api(void)
parse_options_set_use_sat_parser(Parse_Options opts, int use_sat_solver);
link_public_api(int)
parse_options_get_use_sat_parser(Parse_Options opts);
link_public_api(int)
parse_options_timer_expired(Parse_Options opts);
link_public_api(int)
parse_options_memory_exhausted(Parse_Options opts);
link_public_api(int)
parse_options_resources_exhausted(Parse_Options opts);
link_public_api(void)
parse_options_set_screen_width(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_screen_width(Parse_Options opts);
link_public_api(void)
parse_options_set_allow_null(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_allow_null(Parse_Options opts);
link_public_api(void)
parse_options_set_use_cluster_disjuncts(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_use_cluster_disjuncts(Parse_Options opts);
link_public_api(void)
parse_options_set_display_walls(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_walls(Parse_Options opts);
link_public_api(void)
parse_options_set_all_short_connectors(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_all_short_connectors(Parse_Options opts);
link_public_api(void)
parse_options_reset_resources(Parse_Options opts);
/**********************************************************************
*
* The following Parse_Options functions do not directly affect the
* operation of the parser, but they can be useful for organizing the
* search, or displaying the results. They were included as switches for
* convenience in implementing the "standard" version of the link parser
* using the API.
*
***********************************************************************/
link_public_api(void)
parse_options_set_batch_mode(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_batch_mode(Parse_Options opts);
link_public_api(void)
parse_options_set_panic_mode(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_panic_mode(Parse_Options opts);
link_public_api(void)
parse_options_set_display_on(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_on(Parse_Options opts);
link_public_api(void)
parse_options_set_display_postscript(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_postscript(Parse_Options opts);
link_public_api(void)
parse_options_set_display_constituents(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_constituents(Parse_Options opts);
link_public_api(void)
parse_options_set_display_bad(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_bad(Parse_Options opts);
link_public_api(void)
parse_options_set_display_disjuncts(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_disjuncts(Parse_Options opts);
link_public_api(void)
parse_options_set_display_links(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_links(Parse_Options opts);
link_public_api(void)
parse_options_set_display_senses(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_senses(Parse_Options opts);
link_public_api(void)
parse_options_set_display_union(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_display_union(Parse_Options opts);
link_public_api(void)
parse_options_set_echo_on(Parse_Options opts, int val);
link_public_api(int)
parse_options_get_echo_on(Parse_Options opts);
/**********************************************************************
*
* Functions to manipulate Sentences
*
***********************************************************************/
typedef struct Sentence_s * Sentence;
link_public_api(Sentence)
sentence_create(const char *input_string, Dictionary dict);
link_public_api(void)
sentence_delete(Sentence sent);
link_public_api(int)
sentence_split(Sentence sent, Parse_Options opts);
link_public_api(int)
sentence_parse(Sentence sent, Parse_Options opts);
link_public_api(int)
sentence_length(Sentence sent);
link_public_api(const char *)
sentence_get_word(Sentence sent, int wordnum);
link_public_api(int)
sentence_null_count(Sentence sent);
link_public_api(int)
sentence_num_linkages_found(Sentence sent);
link_public_api(int)
sentence_num_valid_linkages(Sentence sent);
link_public_api(int)
sentence_num_linkages_post_processed(Sentence sent);
link_public_api(int)
sentence_num_thin_linkages(Sentence sent);
link_public_api(int)
sentence_num_violations(Sentence sent, int i);
link_public_api(int)
sentence_and_cost(Sentence sent, int i);
link_public_api(int)
sentence_disjunct_cost(Sentence sent, int i);
link_public_api(int)
sentence_link_cost(Sentence sent, int i);
link_public_api(int)
sentence_contains_conjunction(Sentence sent);
/**********************************************************************
*
* Functions that create and manipulate Linkages.
* When a Linkage is requested, the user is given a
* copy of all of the necessary information, and is responsible
* for freeing up the storage when he/she is finished, using
* the routines provided below.
*
***********************************************************************/
typedef struct Linkage_s * Linkage;
link_public_api(Linkage)
linkage_create(int index, Sentence sent, Parse_Options opts);
link_public_api(int)
linkage_get_current_sublinkage(Linkage linkage);
link_public_api(int)
linkage_set_current_sublinkage(Linkage linkage, int index);
link_public_api(void)
linkage_delete(Linkage linkage);
link_public_api(Sentence)
linkage_get_sentence(Linkage linkage);
link_public_api(int)
linkage_get_num_sublinkages(Linkage linkage);
link_public_api(int)
linkage_get_num_words(Linkage linkage);
link_public_api(int)
linkage_get_num_links(Linkage linkage);
link_public_api(int)
linkage_get_link_lword(Linkage linkage, int index);
link_public_api(int)
linkage_get_link_rword(Linkage linkage, int index);
link_public_api(int)
linkage_get_link_length(Linkage linkage, int index);
link_public_api(const char *)
linkage_get_link_label(Linkage linkage, int index);
link_public_api(const char *)
linkage_get_link_llabel(Linkage linkage, int index);
link_public_api(const char *)
linkage_get_link_rlabel(Linkage linkage, int index);
link_public_api(int)
linkage_get_link_num_domains(Linkage linkage, int index);
link_public_api(const char **)
linkage_get_link_domain_names(Linkage linkage, int index);
link_public_api(const char **)
linkage_get_words(Linkage linkage);
link_public_api(const char *)
linkage_get_disjunct_str(Linkage linkage, int w);
link_public_api(double)
linkage_get_disjunct_cost(Linkage linkage, int w);
link_public_api(double)
linkage_get_disjunct_corpus_score(Linkage linkage, int w);
link_public_api(const char *)
linkage_get_word(Linkage linkage, int w);
link_public_api(char *)
linkage_print_disjuncts(Linkage linkage);
link_public_api(void)
linkage_free_disjuncts(char *str);
link_public_api(char *)
linkage_print_links_and_domains(Linkage linkage);
link_public_api(void)
linkage_free_links_and_domains(char *str);
link_public_api(char *)
linkage_print_senses(Linkage linkage);
link_public_api(void)
linkage_free_senses(char *str);
link_public_api(char *)
linkage_print_constituent_tree(Linkage linkage, int mode);
link_public_api(void)
linkage_free_constituent_tree_str(char *str);
link_public_api(char *)
linkage_print_postscript(Linkage linkage, int mode);
link_public_api(void)
linkage_free_postscript(char * str);
link_public_api(char *)
linkage_print_diagram(Linkage linkage);
link_public_api(void)
linkage_free_diagram(char * str);
link_public_api(int)
linkage_compute_union(Linkage linkage);
link_public_api(int)
linkage_is_fat(Linkage linkage);
link_public_api(int)
linkage_unused_word_cost(Linkage linkage);
link_public_api(int)
linkage_disjunct_cost(Linkage linkage);
link_public_api(int)
linkage_and_cost(Linkage linkage);
link_public_api(int)
linkage_link_cost(Linkage linkage);
link_public_api(double)
linkage_corpus_cost(Linkage linkage);
link_public_api(int)
linkage_is_canonical(Linkage linkage);
link_public_api(int)
linkage_is_improper(Linkage linkage);
link_public_api(int)
linkage_has_inconsistent_domains(Linkage linkage);
link_public_api(const char *)
linkage_get_violation_name(Linkage linkage);
/**********************************************************************
*
* Functions that allow special-purpose post-processing of linkages
*
***********************************************************************/
typedef struct Postprocessor_s PostProcessor;
link_public_api(PostProcessor *)
post_process_open(const char *path);
link_public_api(void)
post_process_close(PostProcessor *);
link_public_api(void)
linkage_post_process(Linkage, PostProcessor *);
/**********************************************************************
*
* Constituent node
*
***********************************************************************/
typedef struct CNode_s CNode;
link_public_api(CNode *)
linkage_constituent_tree(Linkage linkage);
link_public_api(void)
linkage_free_constituent_tree(CNode * n);
link_public_api(const char *)
linkage_constituent_node_get_label(const CNode *n);
link_public_api(CNode *)
linkage_constituent_node_get_child(const CNode *n);
link_public_api(CNode *)
linkage_constituent_node_get_next(const CNode *n);
link_public_api(int)
linkage_constituent_node_get_start(const CNode *n);
link_public_api(int)
linkage_constituent_node_get_end(const CNode *n);
/**********************************************************************
*
* Internal functions -- do not use these in new code!
* These are not intended for general public use, but are required to
* work around certain Micorsoft Windows linking oddities
* (specifically, to be callable from the JNI bindings library.)
*
***********************************************************************/
link_public_api(void)
parse_options_print_total_time(Parse_Options opts);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define GNUC_PRINTF( format_idx, arg_idx ) \
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
#else
#define GNUC_PRINTF( format_idx, arg_idx )
#endif
link_public_api(void)
prt_error(const char *fmt, ...) GNUC_PRINTF(1,2);
/*******************************************************
*
* Obsolete functions -- do not use these in new code!
* XXX TBD: These will all go away in Version 5.0.
*
********************************************************/
/* Identical to sentence_get_word()
* XXX TBD: make this go away in Version 5.0. */
link_public_api(const char *)
sentence_get_nth_word(Sentence sent, int i);
/* Who uses this function, anyway? How did this get exported?
* XXX TBD: make this go away in Version 5.0. */
link_public_api(int)
sentence_nth_word_has_disjunction(Sentence sent, int i);
/* This is not intended for general use; its specific to the internals
* of the command-line client. It was exported by accident.
* XXX TBD: make this go away in Version 5.0. */
link_public_api(int)
issue_special_command(const char * line, Parse_Options opts, Dictionary dict);
/* These are obsolete, and do nothing.
* XXX TBD: make these go away in Version 5.0. */
link_public_api(void)
lperror_clear(void);
extern link_public_api(int)
lperrno;
extern link_public_api(char)
lperrmsg[];
LINK_END_DECLS
#endif
|