/usr/lib/python2.7/dist-packages/linkgrammar/clinkgrammar.py is in python-link-grammar 5.3.16-2.
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 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_clinkgrammar')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_clinkgrammar')
_clinkgrammar = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_clinkgrammar', [dirname(__file__)])
except ImportError:
import _clinkgrammar
return _clinkgrammar
if fp is not None:
try:
_mod = imp.load_module('_clinkgrammar', fp, pathname, description)
finally:
fp.close()
return _mod
_clinkgrammar = swig_import_helper()
del swig_import_helper
else:
import _clinkgrammar
del _swig_python_version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr(self, class_type, name):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except __builtin__.Exception:
class _object:
pass
_newclass = 0
lg_Fatal = _clinkgrammar.lg_Fatal
lg_Error = _clinkgrammar.lg_Error
lg_Warn = _clinkgrammar.lg_Warn
lg_Info = _clinkgrammar.lg_Info
lg_Debug = _clinkgrammar.lg_Debug
lg_Trace = _clinkgrammar.lg_Trace
lg_None = _clinkgrammar.lg_None
class lg_errinfo(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, lg_errinfo, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, lg_errinfo, name)
__repr__ = _swig_repr
__swig_getmethods__["severity"] = _clinkgrammar.lg_errinfo_severity_get
if _newclass:
severity = _swig_property(_clinkgrammar.lg_errinfo_severity_get)
__swig_getmethods__["severity_label"] = _clinkgrammar.lg_errinfo_severity_label_get
if _newclass:
severity_label = _swig_property(_clinkgrammar.lg_errinfo_severity_label_get)
__swig_getmethods__["text"] = _clinkgrammar.lg_errinfo_text_get
if _newclass:
text = _swig_property(_clinkgrammar.lg_errinfo_text_get)
def formatmsg(self):
return _lg_error_formatmsg(self)
__swig_destroy__ = _clinkgrammar.delete_lg_errinfo
__del__ = lambda self: None
def __init__(self):
this = _clinkgrammar.new_lg_errinfo()
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this
lg_errinfo_swigregister = _clinkgrammar.lg_errinfo_swigregister
lg_errinfo_swigregister(lg_errinfo)
VDAL = _clinkgrammar.VDAL
CORPUS = _clinkgrammar.CORPUS
NO_DISPLAY = _clinkgrammar.NO_DISPLAY
MULTILINE = _clinkgrammar.MULTILINE
BRACKET_TREE = _clinkgrammar.BRACKET_TREE
SINGLE_LINE = _clinkgrammar.SINGLE_LINE
MAX_STYLES = _clinkgrammar.MAX_STYLES
def linkgrammar_get_version():
return _clinkgrammar.linkgrammar_get_version()
linkgrammar_get_version = _clinkgrammar.linkgrammar_get_version
def linkgrammar_get_dict_version(dict):
return _clinkgrammar.linkgrammar_get_dict_version(dict)
linkgrammar_get_dict_version = _clinkgrammar.linkgrammar_get_dict_version
def linkgrammar_get_dict_locale(dict):
return _clinkgrammar.linkgrammar_get_dict_locale(dict)
linkgrammar_get_dict_locale = _clinkgrammar.linkgrammar_get_dict_locale
def dictionary_create_lang(lang):
return _clinkgrammar.dictionary_create_lang(lang)
dictionary_create_lang = _clinkgrammar.dictionary_create_lang
def dictionary_create_default_lang():
return _clinkgrammar.dictionary_create_default_lang()
dictionary_create_default_lang = _clinkgrammar.dictionary_create_default_lang
def dictionary_get_lang(dict):
return _clinkgrammar.dictionary_get_lang(dict)
dictionary_get_lang = _clinkgrammar.dictionary_get_lang
def dictionary_delete(dict):
return _clinkgrammar.dictionary_delete(dict)
dictionary_delete = _clinkgrammar.dictionary_delete
def dictionary_set_data_dir(path):
return _clinkgrammar.dictionary_set_data_dir(path)
dictionary_set_data_dir = _clinkgrammar.dictionary_set_data_dir
def dictionary_get_data_dir():
return _clinkgrammar.dictionary_get_data_dir()
dictionary_get_data_dir = _clinkgrammar.dictionary_get_data_dir
def parse_options_create():
return _clinkgrammar.parse_options_create()
parse_options_create = _clinkgrammar.parse_options_create
def parse_options_delete(opts):
return _clinkgrammar.parse_options_delete(opts)
parse_options_delete = _clinkgrammar.parse_options_delete
def parse_options_set_verbosity(opts, verbosity):
return _clinkgrammar.parse_options_set_verbosity(opts, verbosity)
parse_options_set_verbosity = _clinkgrammar.parse_options_set_verbosity
def parse_options_get_verbosity(opts):
return _clinkgrammar.parse_options_get_verbosity(opts)
parse_options_get_verbosity = _clinkgrammar.parse_options_get_verbosity
def parse_options_set_linkage_limit(opts, linkage_limit):
return _clinkgrammar.parse_options_set_linkage_limit(opts, linkage_limit)
parse_options_set_linkage_limit = _clinkgrammar.parse_options_set_linkage_limit
def parse_options_get_linkage_limit(opts):
return _clinkgrammar.parse_options_get_linkage_limit(opts)
parse_options_get_linkage_limit = _clinkgrammar.parse_options_get_linkage_limit
def parse_options_set_disjunct_cost(opts, disjunct_cost):
return _clinkgrammar.parse_options_set_disjunct_cost(opts, disjunct_cost)
parse_options_set_disjunct_cost = _clinkgrammar.parse_options_set_disjunct_cost
def parse_options_get_disjunct_cost(opts):
return _clinkgrammar.parse_options_get_disjunct_cost(opts)
parse_options_get_disjunct_cost = _clinkgrammar.parse_options_get_disjunct_cost
def parse_options_set_min_null_count(opts, null_count):
return _clinkgrammar.parse_options_set_min_null_count(opts, null_count)
parse_options_set_min_null_count = _clinkgrammar.parse_options_set_min_null_count
def parse_options_get_min_null_count(opts):
return _clinkgrammar.parse_options_get_min_null_count(opts)
parse_options_get_min_null_count = _clinkgrammar.parse_options_get_min_null_count
def parse_options_set_max_null_count(opts, null_count):
return _clinkgrammar.parse_options_set_max_null_count(opts, null_count)
parse_options_set_max_null_count = _clinkgrammar.parse_options_set_max_null_count
def parse_options_get_max_null_count(opts):
return _clinkgrammar.parse_options_get_max_null_count(opts)
parse_options_get_max_null_count = _clinkgrammar.parse_options_get_max_null_count
def parse_options_set_islands_ok(opts, islands_ok):
return _clinkgrammar.parse_options_set_islands_ok(opts, islands_ok)
parse_options_set_islands_ok = _clinkgrammar.parse_options_set_islands_ok
def parse_options_get_islands_ok(opts):
return _clinkgrammar.parse_options_get_islands_ok(opts)
parse_options_get_islands_ok = _clinkgrammar.parse_options_get_islands_ok
def parse_options_set_short_length(opts, short_length):
return _clinkgrammar.parse_options_set_short_length(opts, short_length)
parse_options_set_short_length = _clinkgrammar.parse_options_set_short_length
def parse_options_get_short_length(opts):
return _clinkgrammar.parse_options_get_short_length(opts)
parse_options_get_short_length = _clinkgrammar.parse_options_get_short_length
def parse_options_set_max_memory(opts, mem):
return _clinkgrammar.parse_options_set_max_memory(opts, mem)
parse_options_set_max_memory = _clinkgrammar.parse_options_set_max_memory
def parse_options_get_max_memory(opts):
return _clinkgrammar.parse_options_get_max_memory(opts)
parse_options_get_max_memory = _clinkgrammar.parse_options_get_max_memory
def parse_options_set_max_parse_time(opts, secs):
return _clinkgrammar.parse_options_set_max_parse_time(opts, secs)
parse_options_set_max_parse_time = _clinkgrammar.parse_options_set_max_parse_time
def parse_options_get_max_parse_time(opts):
return _clinkgrammar.parse_options_get_max_parse_time(opts)
parse_options_get_max_parse_time = _clinkgrammar.parse_options_get_max_parse_time
def parse_options_set_cost_model_type(opts, cm):
return _clinkgrammar.parse_options_set_cost_model_type(opts, cm)
parse_options_set_cost_model_type = _clinkgrammar.parse_options_set_cost_model_type
def parse_options_get_cost_model_type(opts):
return _clinkgrammar.parse_options_get_cost_model_type(opts)
parse_options_get_cost_model_type = _clinkgrammar.parse_options_get_cost_model_type
def parse_options_timer_expired(opts):
return _clinkgrammar.parse_options_timer_expired(opts)
parse_options_timer_expired = _clinkgrammar.parse_options_timer_expired
def parse_options_memory_exhausted(opts):
return _clinkgrammar.parse_options_memory_exhausted(opts)
parse_options_memory_exhausted = _clinkgrammar.parse_options_memory_exhausted
def parse_options_resources_exhausted(opts):
return _clinkgrammar.parse_options_resources_exhausted(opts)
parse_options_resources_exhausted = _clinkgrammar.parse_options_resources_exhausted
def parse_options_set_display_morphology(opts, val):
return _clinkgrammar.parse_options_set_display_morphology(opts, val)
parse_options_set_display_morphology = _clinkgrammar.parse_options_set_display_morphology
def parse_options_get_display_morphology(opts):
return _clinkgrammar.parse_options_get_display_morphology(opts)
parse_options_get_display_morphology = _clinkgrammar.parse_options_get_display_morphology
def parse_options_set_spell_guess(opts, val):
return _clinkgrammar.parse_options_set_spell_guess(opts, val)
parse_options_set_spell_guess = _clinkgrammar.parse_options_set_spell_guess
def parse_options_get_spell_guess(opts):
return _clinkgrammar.parse_options_get_spell_guess(opts)
parse_options_get_spell_guess = _clinkgrammar.parse_options_get_spell_guess
def parse_options_set_all_short_connectors(opts, val):
return _clinkgrammar.parse_options_set_all_short_connectors(opts, val)
parse_options_set_all_short_connectors = _clinkgrammar.parse_options_set_all_short_connectors
def parse_options_get_all_short_connectors(opts):
return _clinkgrammar.parse_options_get_all_short_connectors(opts)
parse_options_get_all_short_connectors = _clinkgrammar.parse_options_get_all_short_connectors
def parse_options_reset_resources(opts):
return _clinkgrammar.parse_options_reset_resources(opts)
parse_options_reset_resources = _clinkgrammar.parse_options_reset_resources
def parse_options_set_use_sat_parser(opts, val):
return _clinkgrammar.parse_options_set_use_sat_parser(opts, val)
parse_options_set_use_sat_parser = _clinkgrammar.parse_options_set_use_sat_parser
def parse_options_get_use_sat_parser(opts):
return _clinkgrammar.parse_options_get_use_sat_parser(opts)
parse_options_get_use_sat_parser = _clinkgrammar.parse_options_get_use_sat_parser
def sentence_create(input_string, dict):
return _clinkgrammar.sentence_create(input_string, dict)
sentence_create = _clinkgrammar.sentence_create
def sentence_delete(sent):
return _clinkgrammar.sentence_delete(sent)
sentence_delete = _clinkgrammar.sentence_delete
def sentence_split(sent, opts):
return _clinkgrammar.sentence_split(sent, opts)
sentence_split = _clinkgrammar.sentence_split
def sentence_parse(sent, opts):
return _clinkgrammar.sentence_parse(sent, opts)
sentence_parse = _clinkgrammar.sentence_parse
def sentence_length(sent):
return _clinkgrammar.sentence_length(sent)
sentence_length = _clinkgrammar.sentence_length
def sentence_null_count(sent):
return _clinkgrammar.sentence_null_count(sent)
sentence_null_count = _clinkgrammar.sentence_null_count
def sentence_num_linkages_found(sent):
return _clinkgrammar.sentence_num_linkages_found(sent)
sentence_num_linkages_found = _clinkgrammar.sentence_num_linkages_found
def sentence_num_valid_linkages(sent):
return _clinkgrammar.sentence_num_valid_linkages(sent)
sentence_num_valid_linkages = _clinkgrammar.sentence_num_valid_linkages
def sentence_num_linkages_post_processed(sent):
return _clinkgrammar.sentence_num_linkages_post_processed(sent)
sentence_num_linkages_post_processed = _clinkgrammar.sentence_num_linkages_post_processed
def sentence_num_violations(sent, i):
return _clinkgrammar.sentence_num_violations(sent, i)
sentence_num_violations = _clinkgrammar.sentence_num_violations
def sentence_disjunct_cost(sent, i):
return _clinkgrammar.sentence_disjunct_cost(sent, i)
sentence_disjunct_cost = _clinkgrammar.sentence_disjunct_cost
def sentence_link_cost(sent, i):
return _clinkgrammar.sentence_link_cost(sent, i)
sentence_link_cost = _clinkgrammar.sentence_link_cost
def linkage_create(index, sent, opts):
return _clinkgrammar.linkage_create(index, sent, opts)
linkage_create = _clinkgrammar.linkage_create
def linkage_delete(linkage):
return _clinkgrammar.linkage_delete(linkage)
linkage_delete = _clinkgrammar.linkage_delete
def linkage_print_diagram(linkage, display_walls, screen_width):
return _clinkgrammar.linkage_print_diagram(linkage, display_walls, screen_width)
linkage_print_diagram = _clinkgrammar.linkage_print_diagram
def linkage_print_postscript(linkage, display_walls, print_ps_header):
return _clinkgrammar.linkage_print_postscript(linkage, display_walls, print_ps_header)
linkage_print_postscript = _clinkgrammar.linkage_print_postscript
def linkage_print_links_and_domains(linkage):
return _clinkgrammar.linkage_print_links_and_domains(linkage)
linkage_print_links_and_domains = _clinkgrammar.linkage_print_links_and_domains
def linkage_print_senses(linkage):
return _clinkgrammar.linkage_print_senses(linkage)
linkage_print_senses = _clinkgrammar.linkage_print_senses
def linkage_print_constituent_tree(linkage, mode):
return _clinkgrammar.linkage_print_constituent_tree(linkage, mode)
linkage_print_constituent_tree = _clinkgrammar.linkage_print_constituent_tree
def linkage_print_disjuncts(linkage):
return _clinkgrammar.linkage_print_disjuncts(linkage)
linkage_print_disjuncts = _clinkgrammar.linkage_print_disjuncts
def linkage_print_pp_msgs(linkage):
return _clinkgrammar.linkage_print_pp_msgs(linkage)
linkage_print_pp_msgs = _clinkgrammar.linkage_print_pp_msgs
def linkage_get_num_words(linkage):
return _clinkgrammar.linkage_get_num_words(linkage)
linkage_get_num_words = _clinkgrammar.linkage_get_num_words
def linkage_get_num_links(linkage):
return _clinkgrammar.linkage_get_num_links(linkage)
linkage_get_num_links = _clinkgrammar.linkage_get_num_links
def linkage_get_link_lword(linkage, index):
return _clinkgrammar.linkage_get_link_lword(linkage, index)
linkage_get_link_lword = _clinkgrammar.linkage_get_link_lword
def linkage_get_link_rword(linkage, index):
return _clinkgrammar.linkage_get_link_rword(linkage, index)
linkage_get_link_rword = _clinkgrammar.linkage_get_link_rword
def linkage_get_link_length(linkage, index):
return _clinkgrammar.linkage_get_link_length(linkage, index)
linkage_get_link_length = _clinkgrammar.linkage_get_link_length
def linkage_get_link_label(linkage, index):
return _clinkgrammar.linkage_get_link_label(linkage, index)
linkage_get_link_label = _clinkgrammar.linkage_get_link_label
def linkage_get_link_llabel(linkage, index):
return _clinkgrammar.linkage_get_link_llabel(linkage, index)
linkage_get_link_llabel = _clinkgrammar.linkage_get_link_llabel
def linkage_get_link_rlabel(linkage, index):
return _clinkgrammar.linkage_get_link_rlabel(linkage, index)
linkage_get_link_rlabel = _clinkgrammar.linkage_get_link_rlabel
def linkage_get_link_num_domains(linkage, index):
return _clinkgrammar.linkage_get_link_num_domains(linkage, index)
linkage_get_link_num_domains = _clinkgrammar.linkage_get_link_num_domains
def linkage_get_link_domain_names(linkage, index):
return _clinkgrammar.linkage_get_link_domain_names(linkage, index)
linkage_get_link_domain_names = _clinkgrammar.linkage_get_link_domain_names
def linkage_get_words(linkage):
return _clinkgrammar.linkage_get_words(linkage)
linkage_get_words = _clinkgrammar.linkage_get_words
def linkage_get_word(linkage, w):
return _clinkgrammar.linkage_get_word(linkage, w)
linkage_get_word = _clinkgrammar.linkage_get_word
def linkage_unused_word_cost(linkage):
return _clinkgrammar.linkage_unused_word_cost(linkage)
linkage_unused_word_cost = _clinkgrammar.linkage_unused_word_cost
def linkage_disjunct_cost(linkage):
return _clinkgrammar.linkage_disjunct_cost(linkage)
linkage_disjunct_cost = _clinkgrammar.linkage_disjunct_cost
def linkage_link_cost(linkage):
return _clinkgrammar.linkage_link_cost(linkage)
linkage_link_cost = _clinkgrammar.linkage_link_cost
def linkage_corpus_cost(linkage):
return _clinkgrammar.linkage_corpus_cost(linkage)
linkage_corpus_cost = _clinkgrammar.linkage_corpus_cost
def linkage_get_violation_name(linkage):
return _clinkgrammar.linkage_get_violation_name(linkage)
linkage_get_violation_name = _clinkgrammar.linkage_get_violation_name
def _lg_error_formatmsg(lge):
return _clinkgrammar._lg_error_formatmsg(lge)
_lg_error_formatmsg = _clinkgrammar._lg_error_formatmsg
def lg_error_clearall():
return _clinkgrammar.lg_error_clearall()
lg_error_clearall = _clinkgrammar.lg_error_clearall
def _prt_error(arg1):
return _clinkgrammar._prt_error(arg1)
_prt_error = _clinkgrammar._prt_error
def _py_error_default_handler(lge, pedh_data):
return _clinkgrammar._py_error_default_handler(lge, pedh_data)
_py_error_default_handler = _clinkgrammar._py_error_default_handler
def _py_error_set_handler(func_and_data):
return _clinkgrammar._py_error_set_handler(func_and_data)
_py_error_set_handler = _clinkgrammar._py_error_set_handler
def _py_error_printall(func_and_data):
return _clinkgrammar._py_error_printall(func_and_data)
_py_error_printall = _clinkgrammar._py_error_printall
def delete_lg_errinfo(lge):
return _clinkgrammar.delete_lg_errinfo(lge)
delete_lg_errinfo = _clinkgrammar.delete_lg_errinfo
# This file is compatible with both classic and new-style classes.
|