pyCEURmake API Documentation
ceur_ws
Conference
Bases: JSONAble
Represents a conference
Source code in ceurws/ceur_ws.py
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
|
getSamples()
staticmethod
get sample records of the entity
Source code in ceurws/ceur_ws.py
767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
|
ConferenceManager
Bases: EntityManager
Contains multiple ceurws sessions
Source code in ceurws/ceur_ws.py
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
|
Editor
Bases: JSONAble
Represents a volume editor
Source code in ceurws/ceur_ws.py
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
|
getSamples()
staticmethod
get sample records of the entity
Source code in ceurws/ceur_ws.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
|
EditorManager
Bases: EntityManager
Contains multiple ceurws editors
Source code in ceurws/ceur_ws.py
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 |
|
Paper
Bases: JSONAble
Represents a paper
Source code in ceurws/ceur_ws.py
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
|
__str__()
return my string representation
Returns:
Name | Type | Description |
---|---|---|
str |
my text representation |
Source code in ceurws/ceur_ws.py
609 610 611 612 613 614 615 616 617 |
|
getSamples()
staticmethod
get sample records of the entity
Source code in ceurws/ceur_ws.py
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
|
PaperManager
Bases: EntityManager
Contains multiple ceurws papers
Source code in ceurws/ceur_ws.py
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 |
|
Session
Bases: JSONAble
Represents a session in ceur-ws
Source code in ceurws/ceur_ws.py
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
|
__init__(id, title, position, papers)
constructor
Source code in ceurws/ceur_ws.py
645 646 647 648 649 650 651 652 653 |
|
getSamples()
staticmethod
get sample records of the entity
Source code in ceurws/ceur_ws.py
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
|
SessionManager
Bases: EntityManager
Contains multiple ceurws sessions
Source code in ceurws/ceur_ws.py
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 |
|
Volume
Bases: JSONAble
Represents a volume in ceur-ws
Source code in ceurws/ceur_ws.py
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 |
|
papers
property
papers of this volume
sessions
property
writable
sessions of this volume
__init__(number=None, url=None, title=None, fullTitle=None, acronym=None, lang=None, location=None, country=None, countryWikidataId=None, region=None, city=None, cityWikidataId=None, ordinal=None, date=None, dateFrom=None, dateTo=None, pubYear=None, pubDate=None, submitDate=None, valid=True, conference=None, editors=None, sessions=None, virtualEvent=False, submittedBy=None)
constructor
Source code in ceurws/ceur_ws.py
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 |
|
extractAndSetLocation(locationStr)
Extracts the location from the given string and returns the found city and country ToDo: Once the EventReferenceParser from cc is updated to support city country combinations switch to it Args: locationStr: string to extract the locations from
Source code in ceurws/ceur_ws.py
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 |
|
extractDates(dateStr, durationThreshold=11)
" Extracts the start and end time from the given string optimized for the format of the loctime property Args: dateStr: string to extract the dates from durationThreshold: number of days allowed between two extracted dates
Source code in ceurws/ceur_ws.py
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 |
|
extractValuesFromVolumePage(timeout=3)
extract values from the given volume page
Source code in ceurws/ceur_ws.py
363 364 365 366 367 368 369 370 371 372 373 374 |
|
getSubmittingEditor()
Returns the Editor that submitted the volume
Source code in ceurws/ceur_ws.py
376 377 378 379 380 381 382 383 384 385 386 |
|
getVolumeNumber()
get number of the volume
Source code in ceurws/ceur_ws.py
112 113 114 115 116 117 |
|
getVolumeUrl()
get the url of the volume page
Source code in ceurws/ceur_ws.py
119 120 121 122 123 124 125 126 127 |
|
getVolumeUrlOf(number)
staticmethod
get the volume url of the given volume number Args: number: volume number
Source code in ceurws/ceur_ws.py
129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
get_loctime()
get the loctime
Source code in ceurws/ceur_ws.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
isVirtualEvent()
Returns True if the event is a virtual event
Source code in ceurws/ceur_ws.py
143 144 145 146 147 |
|
normalize()
Tries to normalize the properties e.g. breaking loctime into designated location and time properties Example: 'Vienna, Austria, July 25th, 2022'
Source code in ceurws/ceur_ws.py
149 150 151 152 153 154 |
|
rankLocations(locationStr, locations)
staticmethod
rank the given locations to find the best match to the given location string Args: locationStr: location string locations: list of locations objects
Source code in ceurws/ceur_ws.py
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 |
|
removePartsMatching(value, pattern, separator=',')
staticmethod
Removes parts from the given value matching the pattern
Source code in ceurws/ceur_ws.py
295 296 297 298 299 300 301 302 303 304 305 306 |
|
resolveLoctime()
Resolve the loctime property by breaking it down to city, region, country, dateFrom, and dateTo
Source code in ceurws/ceur_ws.py
175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
VolumeManager
Bases: EntityManager
Contains multiple ceurws volumes
Source code in ceurws/ceur_ws.py
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 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
|
getIndexHtml(force=False)
get the index html
Source code in ceurws/ceur_ws.py
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
|
load()
load the volumeManager
Source code in ceurws/ceur_ws.py
408 409 410 411 412 413 414 415 416 |
|
loadFromBackup()
load from the SQLITE Cache file
Source code in ceurws/ceur_ws.py
418 419 420 421 422 |
|
loadFromIndexHtml(parser_config=None, vol_limit=None)
load my content from the index.html file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parser_config(ParserConfig) |
the parser Configuration to use |
required |
Source code in ceurws/ceur_ws.py
499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
|
recreate(parser_config)
recreate me by a full parse of all volume files
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parser_config |
ParserConfig
|
parser configuration |
required |
Source code in ceurws/ceur_ws.py
439 440 441 442 443 444 445 446 447 |
|
update(parser_config)
update me by a checking for recently added volumes
Source code in ceurws/ceur_ws.py
424 425 426 427 428 429 |
|
update_or_recreate(parser_config)
recreate or update me by parsing the index.html file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parser_config |
ParserConfig
|
parser configuration |
required |
Source code in ceurws/ceur_ws.py
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 |
|
ceur_ws_web_cmd
Created on 2024-02-22
@author: wf
CeurWsCmd
Bases: WebserverCmd
command line handling for CEUR-WS Volume browser
Source code in ceurws/ceur_ws_web_cmd.py
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 |
|
__init__()
constructor
Source code in ceurws/ceur_ws_web_cmd.py
27 28 29 30 31 32 33 |
|
getArgParser(description, version_msg)
override the default argparser call
Source code in ceurws/ceur_ws_web_cmd.py
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 |
|
handle_args()
handle the command line arguments
Source code in ceurws/ceur_ws_web_cmd.py
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 |
|
main(argv=None)
main call
Source code in ceurws/ceur_ws_web_cmd.py
150 151 152 153 154 155 156 |
|
config
CEURWS
CEUR-WS
Source code in ceurws/config.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
get_home_path()
staticmethod
Get home path
Source code in ceurws/config.py
12 13 14 15 16 17 18 19 20 |
|
dblp
Created on 2024-03-09
@author: wf
DblpAuthorIdentifier
dataclass
represents an author id available in dblp and the corresponding property in wikidata
Source code in ceurws/dblp.py
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 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
all()
classmethod
returns all available identifiers
Source code in ceurws/dblp.py
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 |
|
getAllAsMap()
classmethod
return all all available identifiers as map
Source code in ceurws/dblp.py
475 476 477 478 479 480 481 482 483 |
|
getWikidataIdQueryPart(id_name, value, var)
classmethod
Generates for the given identifier the wikidata query Args: id_name: name of the identifier value: the identifier value var: name of the variable which should have the id
Source code in ceurws/dblp.py
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 |
|
DblpAuthors
Bases: DblpManager
Manage all authors of DBLP indexed volumes.
Source code in ceurws/dblp.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
load(force_query=False)
load my authors
Source code in ceurws/dblp.py
64 65 66 67 68 69 70 71 72 73 74 |
|
DblpEditors
Bases: DblpManager
Manage all editors of DBLP indexed volumes.
Source code in ceurws/dblp.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
load(force_query=False)
load my editors
Source code in ceurws/dblp.py
86 87 88 89 90 91 92 93 94 95 96 |
|
DblpEndpoint
provides queries and a dblp endpoint to execute them
Source code in ceurws/dblp.py
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 |
|
__init__(endpoint, debug=False)
constructor
Source code in ceurws/dblp.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
|
convertEntityIdToUrlId(entityId)
Convert the given entityId to the id used in the url Note: use with care this conversion does not always work Args: entityId: id of the entity Example: conf/aaai/2022 → conf/aaai/aaai2022
Returns str - id used in the url None - if the given entityId can not be converted
Source code in ceurws/dblp.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
|
getDblpIdByVolumeNumber(number)
Get the dblp entity id by given volume number Args: number: volume number
Source code in ceurws/dblp.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
|
getDblpUrlByDblpId(entityId=None)
Get the dblp url for given entity id Args: entityId: volume url
Source code in ceurws/dblp.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
|
getEditorsOfVolume(number)
Get the editors for the given volume number Args: number: number of the volume if none query for all ceur-ws editors
Returns:
Type | Description |
---|---|
list[dict]
|
list of dictionaries where a dict represents one editor containing all identifiers of the editor |
Source code in ceurws/dblp.py
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 |
|
get_ceur_proceeding(volume_number)
get ceur proceeding by volume number from dblp Args: volume_number: number of the volume
Source code in ceurws/dblp.py
293 294 295 296 297 298 299 300 301 |
|
get_ceur_volume_papers(volume_number)
Get all papers published in CEUR-WS from dblp
Source code in ceurws/dblp.py
284 285 286 287 288 289 290 291 |
|
get_lod(cache_name, query_name, force_query=False)
Get the list of dictionaries for the given cache and query names, optionally forcing a query.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cache_name |
str
|
The name of the cache to load or store the LOD. |
required |
query_name |
str
|
The name of the query to execute if the data is not cached or forced to query. |
required |
force_query |
bool
|
If True, forces the query execution even if the data is cached. Defaults to False. |
False
|
Returns:
Type | Description |
---|---|
list
|
List[Dict]: The list of dictionaries loaded either from cache or by executing the SPARQL query. |
Source code in ceurws/dblp.py
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 |
|
load_all(force_query=False)
load all managers
Source code in ceurws/dblp.py
243 244 245 246 247 248 |
|
toDblpUrl(entityId, withPostfix=False)
Convert the given id to the corresponding dblp url Args: entityId: dblp event id withPostfix: If True add the postfix ".html"
Returns:
Type | Description |
---|---|
str | None
|
dblp url of None if the url can not be generated for the given input |
Source code in ceurws/dblp.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
|
DblpManager
Manage DBLP entities.
Attributes:
Name | Type | Description |
---|---|---|
endpoint |
DblpEndpoint
|
The endpoint for DBLP queries. |
cache_name |
str
|
The name of the cache to use. |
query_name |
str
|
The name of the query to execute. |
Source code in ceurws/dblp.py
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 |
|
__init__(endpoint, cache_name, query_name)
Initializes the DBLP Manager with the given endpoint, cache name, and query name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
endpoint |
DblpEndpoint
|
The endpoint for DBLP queries. |
required |
cache_name |
str
|
The name of the cache to use. |
required |
query_name |
str
|
The name of the query to execute. |
required |
Source code in ceurws/dblp.py
32 33 34 35 36 37 38 39 40 41 42 43 |
|
load(force_query=False)
Loads a list of dictionaries from the DBLP endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
force_query |
bool
|
If True, forces a new query to the endpoint. Defaults to False. |
False
|
Source code in ceurws/dblp.py
45 46 47 48 49 50 51 52 |
|
DblpPapers
Bases: DblpManager
manage all CEUR-WS papers indexed by dblp
Source code in ceurws/dblp.py
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 |
|
load(force_query=False)
load my editors
Source code in ceurws/dblp.py
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 |
|
DblpVolumes
Bases: DblpManager
Manage all DBLP indexed volumes.
Source code in ceurws/dblp.py
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 |
|
load(force_query=False)
load my volumes
Source code in ceurws/dblp.py
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 |
|
indexparser
Created on 11.08.2022
@author: wf
IndexHtmlParser
Bases: Textparser
CEUR-WS Index.html parser
Source code in ceurws/indexparser.py
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 |
|
__init__(htmlText, config=None)
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
htmlText(str) |
the HTML text of the index page |
required |
Source code in ceurws/indexparser.py
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 |
|
find(startLine, compiledPattern, step=1)
find the next line with the given compiled regular expression pattern
Parameters:
Name | Type | Description | Default |
---|---|---|---|
startLine(int) |
index of the line to start search |
required | |
compiledPattern(re.Pattern) |
the compiled regular expression pattern to search for |
required | |
step(int) |
the steps to take e.g. +1 for forward -1 for backwards |
required |
Return
int: the line number of the line or None if nothing was found
Source code in ceurws/indexparser.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|
findVolume(volCount, startLine, expectedTr=3, progress=10)
find Volume lines from the given startLine
Parameters:
Name | Type | Description | Default | ||||
---|---|---|---|---|---|---|---|
volCount(int) |
the volumeCount before the startLine |
required | |||||
startLine(int) |
index of the line to search |
required | |||||
expectedTr(int) |
number of
required
|
progress(int)
|
|
how often to show the progress
required
|
|
Returns:
Type | Description |
---|---|
tuple[int | None, int | None]
|
endLine of the volume html or None |
Source code in ceurws/indexparser.py
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 |
|
getInfo(volume, info, pattern, line)
get the info for the given patterns trying to match the pattern on the given line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(dict) |
the result dict |
required | |
info(str) |
the name of the dict key to fill |
required | |
pattern(regexp) |
the regular expression to check |
required | |
line(str) |
the line to check |
required |
Source code in ceurws/indexparser.py
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 |
|
parse(vol_limit=None)
parse my html code for Volume info
Source code in ceurws/indexparser.py
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 |
|
parseVolume(volCount, fromLine, toLine, verbose)
parse a volume from the given line range
Source code in ceurws/indexparser.py
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 |
|
setSeeAlsoVolumes(volume, firstLine, lastLine)
Extract and set the volume numbers form the see also list Example result {"seealso": ["Vol-3067"]}
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume |
dict
|
the volumeRecord to modify |
required |
lineIndex |
where to start setting the volumeTitle |
required |
Source code in ceurws/indexparser.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
setVolumeName(volume, line)
set the volume name
Source code in ceurws/indexparser.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
setVolumeNumber(volume, href)
set the volumen number
Source code in ceurws/indexparser.py
142 143 144 145 146 147 148 149 150 |
|
setVolumeTitle(volume, lineIndex)
set the volume title
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(dict) |
the volumeRecord to modify |
required | |
lineIndex |
int
|
where to start setting the volumeTitle |
required |
Source code in ceurws/indexparser.py
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 |
|
ParserConfig
parser configuration
Source code in ceurws/indexparser.py
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 |
|
__init__(progress_bar=None, down_to_volume=1, force_download=False, verbose=False, debug=False)
Initializes the ParserConfig with a progress bar, volume threshold, and debug mode setting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
progress_bar |
An instance of a Progressbar class to be used for showing progress during parsing. |
None
|
|
down_to_volume |
int
|
The volume threshold for parsing. Only volumes equal to or less than this value will be considered. Defaults to 1. |
1
|
force_download(bool) |
if True download the file to parse |
required | |
verbose(bool) |
if True give verbose feedback |
required | |
debug |
bool
|
Indicates whether debugging mode is enabled. If True, additional debug information will be provided during parsing. Defaults to False. |
False
|
Source code in ceurws/indexparser.py
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 |
|
location
Created on 2023-07-15
@author: wf
LocationLookup
Class for location lookup.
Source code in ceurws/location.py
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 |
|
__init__()
Constructor for LocationLookup.
Source code in ceurws/location.py
41 42 43 44 45 46 47 48 49 |
|
getCityByWikiDataId(wikidataID)
Get the city for the given wikidataID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wikidataID |
str
|
The wikidata ID. |
required |
Returns:
Name | Type | Description |
---|---|---|
City |
The city with the given wikidataID. |
Source code in ceurws/location.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
initPredefinedLocations()
classmethod
Initialize predefined locations.
Source code in ceurws/location.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
lookup(locationText, logFile=sys.stdout)
Lookup a location based on the given locationText.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
locationText |
str
|
The location to lookup. |
required |
logFile |
file
|
The log file to write the output. |
stdout
|
Returns:
Name | Type | Description |
---|---|---|
City |
The located city based on the locationText. |
Source code in ceurws/location.py
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 |
|
lookupGeograpy(locationText)
Lookup the given location by the given locationText.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
locationText |
str
|
The location to lookup. |
required |
Returns:
Name | Type | Description |
---|---|---|
City |
The located city based on the locationText. |
Source code in ceurws/location.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
lookupNominatim(locationText)
Lookup the location for the given locationText (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
locationText |
str
|
The location text to search for. |
required |
Returns:
Name | Type | Description |
---|---|---|
City |
The location found by Nominatim. |
Source code in ceurws/location.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
loctime
Created on 2023-12-22
@author: wf
LoctimeParser
A parser class for handling loctime lookups. This class provides methods to load, parse, and update loctime data using a dictionary of dictionaries structure.
Attributes:
Name | Type | Description |
---|---|---|
filepath |
str
|
The file path to the loctime YAML configuration. |
lookups |
dict
|
The loaded lookup dictionaries from the YAML file. |
multi_word |
dict
|
A dictionary to handle multi-word keys. |
multi_word_lookups |
dict
|
A version of lookups with keys as concatenated words. |
counters |
dict
|
A dictionary of Counter objects for various categories. |
year_pattern |
Pattern
|
A compiled regex pattern to match 4-digit years. |
total_loctimes |
int
|
The total count of processed loctimes. |
Source code in ceurws/loctime.py
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 |
|
__init__(filepath=None)
Initializes the LoctimeParser object, setting up paths, loading lookups, and initializing counters and patterns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath |
Path
|
The path to the loctime YAML file. Defaults to a predefined path if None is provided. |
None
|
Raises: FileNotFoundError: Raises an error if the specified YAML file does not exist.
Source code in ceurws/loctime.py
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 |
|
create_pareto_analysis(level=3, outof=5)
Creates a Pareto analysis for each category in the lookups and returns the percentage table for the distribution across the specified levels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
level |
int
|
The number of segments to divide the data into within the top "outof" parts. |
3
|
outof |
int
|
1 out of n value e.g. on level 1 we have 1:5 which leads to the original pareto 80:20 percent rule, on level 2 we have 80:(20=16:4) percent which is equivalent to 80/96 thresholds percent on level 3 we have 80:(20=16:4=(3.2:0.8) percent which leads to 80%,96%,99.2% thresholds |
5
|
Source code in ceurws/loctime.py
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 |
|
get_parts(loctime)
Splits the loctime string into parts and subparts, considering multi-word entries.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
loctime |
str
|
The loctime string to split. |
required |
Returns:
Name | Type | Description |
---|---|---|
list |
A list of parts and subparts. |
Source code in ceurws/loctime.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
load()
Loads the lookup data from the YAML file specified by the filepath attribute.
This method attempts to open and read the YAML file, converting its contents into a dictionary. If the file is empty or does not exist, it returns an empty dictionary.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
A dictionary representing the loaded data from the YAML file. If the file is empty or non-existent, an empty dictionary is returned. |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If the specified file does not exist. |
YAMLError
|
If there is an error parsing the YAML file. |
Source code in ceurws/loctime.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
parse(loctime)
Alternative parse of CEUR-WS loctimes using lookups
Parameters:
Name | Type | Description | Default |
---|---|---|---|
loctime |
str
|
The loctime string to parse. |
required |
Source code in ceurws/loctime.py
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 |
|
save()
Saves the current lookup dictionary to a YAML file.
Source code in ceurws/loctime.py
102 103 104 105 106 107 108 109 110 111 112 113 |
|
setup()
Prepares the parser by initializing multi-word handling and creating a modified version of the lookup dictionaries with keys as concatenated words. This method sets up the 'multi_word' and 'multi_word_lookups' dictionaries to facilitate the parsing process, especially for multi-word keys.
Source code in ceurws/loctime.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
update_lookup_counts()
to be called ffter processing all loctimes and updating counters update lookup dicts with new counts
Source code in ceurws/loctime.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|
PercentageTable
A class for creating a table that displays values and their corresponding percentages of a total.
Attributes:
Name | Type | Description |
---|---|---|
total |
float
|
The total value used for calculating percentages. |
column_title |
str
|
The title for the first column in the table. |
digits |
int
|
The number of decimal places for rounding percentages. |
rows |
list
|
A list of dictionaries representing rows in the table. |
Source code in ceurws/loctime.py
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 |
|
__init__(column_title, total, digits)
Initializes the PercentageTable with a title for the column, a total value, and specified precision for percentages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
column_title |
str
|
The title for the first column. |
required |
total |
float
|
The total value for calculating percentages. |
required |
digits |
int
|
The precision for percentage values. |
required |
Source code in ceurws/loctime.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
add_value(row_title, value)
Adds a row to the table with the given title and value, calculating the percentage of the total.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
row_title |
str
|
The title for the row. |
required |
value |
float
|
The value for the row, which is used to calculate its percentage of the total. |
required |
Source code in ceurws/loctime.py
273 274 275 276 277 278 279 280 281 282 |
|
generate_table(tablefmt='grid')
Generates a string representation of the table using the tabulate library.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The string representation of the table with headers and formatted rows. |
Source code in ceurws/loctime.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
models
ceur
Created on 2024-03-17
CEUR Workshop Proceedings (CEUR-WS.org)
Metamodel @author: wf
Paper
Bases: SQLModel
Represents a paper with details such as authors, volume number, and title.
Source code in ceurws/models/ceur.py
60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
Volume
Bases: SQLModel
a single CEUR-WS Volume
Source code in ceurws/models/ceur.py
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 |
|
dblp
Created on 2023 @author: Tim Holzheim
refactored 2024-03-09 by wf
DblpPaper
a paper indexed by dblp.org
Source code in ceurws/models/dblp.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
DblpProceeding
a proceeding indexed by dblp.org
Source code in ceurws/models/dblp.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
DblpScholar
a scholar indexed by dblp.org
example: Tim Berners-Lee https://dblp.org/pid/b/TimBernersLee.html
Source code in ceurws/models/dblp.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
dblp2
Created on 2024-03-16
@author: wf
Authorship
Bases: SQLModel
Represents the relationship between a scholar and a paper, capturing the authorship details.
Source code in ceurws/models/dblp2.py
54 55 56 57 58 59 60 |
|
Editorship
Bases: SQLModel
Represents the relationship between a scholar and a proceeding, indicating the scholar's role as an editor.
Source code in ceurws/models/dblp2.py
45 46 47 48 49 50 51 |
|
Paper
Bases: SQLModel
A paper indexed in DBLP with additional details. The paper URL is used as the unique identifier.
Source code in ceurws/models/dblp2.py
22 23 24 25 26 27 28 29 30 31 |
|
Proceeding
Bases: SQLModel
A proceeding indexed in DBLP with additional details.
Source code in ceurws/models/dblp2.py
34 35 36 37 38 39 40 41 42 |
|
Scholar
Bases: SQLModel
Represents a scholar with information fetched from DBLP and possibly other sources.
Source code in ceurws/models/dblp2.py
10 11 12 13 14 15 16 17 18 19 |
|
namedqueries
Created on 2023-03-21
@author: wf
NamedQueries
get named queries
Source code in ceurws/namedqueries.py
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 |
|
__init__(wikiId='cr')
Source code in ceurws/namedqueries.py
17 18 19 20 21 22 23 24 |
|
query()
run query
Source code in ceurws/namedqueries.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
toQueryManager()
convert me to a QueryManager
Source code in ceurws/namedqueries.py
47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
papertocparser
Created on 2023-03-22
@author: wf
PaperTocParser
Bases: Textparser
parser for paper table of contents
Source code in ceurws/papertocparser.py
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 |
|
__init__(number, soup, debug=False)
constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number(str) |
the volume number |
required | |
soup(BeautifulSoup) |
the parser input |
required | |
debug(bool) |
if True print out debug info |
required |
Source code in ceurws/papertocparser.py
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 |
|
parsePapers()
parse the toc to papers
Source code in ceurws/papertocparser.py
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 |
|
services
entity_fishing
CeurEntityFishing
EntityFishing component for spaCy pipeline. modified version of https://github.com/Lucaterre/spacyfishing/blob/main/spacyfishing/entity_fishing_linker.py
Source code in ceurws/services/entity_fishing.py
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 |
|
__call__(doc)
The function takes a spaCy Doc object, and returns a Doc object with the entities disambiguated and linked
:param doc: Doc :type doc: Doc :return: A Doc object with the entities linked to the corresponding Wikipedia page.
Source code in ceurws/services/entity_fishing.py
428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
|
__init__(nlp, name, api_ef_base, language, extra_info, filter_statements, verbose)
EntityFishing
main class component.
Note
Show default config for default attributes values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_ef_base |
str
|
describes url of the entity-fishing API used. |
required |
language |
str
|
matches the language of the resources to |
required |
extra_info |
bool
|
attach extra information to spans as normalised term, |
required |
filter_statements |
list
|
filter others KB ids |
required |
verbose |
bool
|
display logging messages. |
required |
Attributes:
Name | Type | Description |
---|---|---|
api_ef_base |
str
|
cf. |
language |
dict
|
cf. |
wikidata_url_base |
str
|
wikidata base url (to concatenate QID identifiers). |
flag_extra |
bool
|
cf. |
filter_statements |
list
|
cf. |
verbose |
bool
|
cf. |
Source code in ceurws/services/entity_fishing.py
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 |
|
concept_look_up_batch(wiki_id_batch)
This function takes a list of wikipedia ids and returns a list of responses from the API
:param wiki_id_batch: a list of wikipedia ids :type wiki_id_batch: str :return: A list of requests.Response objects.
Source code in ceurws/services/entity_fishing.py
263 264 265 266 267 268 269 270 271 272 273 274 |
|
disambiguate_text_batch(files_batch)
The function
disambiguate_text_batch
takes a list of dictionaries as input, where each dictionary contains the text to be disambiguated and the corresponding language. The function returns a list of responses, where each response contains the disambiguated text
:param files_batch: a list of dictionaries, each dictionary containing the following keys: :type files_batch: list[dict] :return: A list of responses.
Source code in ceurws/services/entity_fishing.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
|
generic_client_batch(method, url_batch, verbose, params=None, files_batch=None)
staticmethod
It takes a list of urls and a list of files, and it sends a request to each url with the corresponding file
:param method: str, :type method: str :param url_batch: a list of urls to send requests to :type url_batch: list[str] :param verbose: if True, the client will print out the status of each request :type verbose: bool :param params: dict = None, :type params: dict :param files_batch: a list of dictionaries, each dictionary containing the file to be annotated :type files_batch: list[dict] :return: A list of responses.
Source code in ceurws/services/entity_fishing.py
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 |
|
look_extra_informations_on_entity(span, res_desc)
It takes a span and a dictionary of information about the entity, and adds the information to the span
:param span: The Span object that the extension is being applied to :type span: Span :param res_desc: the result of the query to Wikidata :type res_desc: dict
Source code in ceurws/services/entity_fishing.py
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 |
|
main_disambiguation_process_batch(text_batch, terms_batch, entities_batch)
It takes a batch of text, terms and entities, and returns a batch of disambiguated entities
:param text_batch: a list of strings, each string is a text to be disambiguated :type text_batch: list[str] :param terms_batch: a list of strings, each string is a list of terms separated by a space :type terms_batch: list[str] :param entities_batch: a list of lists of entities, where each entity is a dictionary with the following keys: :type entities_batch: list[list] :return: A list of tuples, each tuple containing the response, metadata, and entities_enhanced.
Source code in ceurws/services/entity_fishing.py
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 |
|
pipe(stream, batch_size=128)
For each batch of documents, we disambiguate the named entities in the documents, and then yield the results
:param stream: a generator that yields Doc objects :type stream: iterator :param batch_size: The number of documents to process at a time, defaults to 128 (optional) :type batch_size: int
Source code in ceurws/services/entity_fishing.py
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
|
prepare_data(text, terms, entities, language, full=False)
staticmethod
The function takes in a text, a list of entities, a language dictionary and a boolean value. It then returns a dictionary with a key called "query" and a value that is a JSON object
:param text: The text to be analyzed :type text: str :param terms: the terms to be searched for :type terms: str :param entities: list of entities in the text :type entities: list :param language: the language of the text :type language: dict :param full: if True, the response will contain the full text of the article, defaults to False :type full: bool (optional) :return: A dictionary with a key of "query" and a value of a json object.
Source code in ceurws/services/entity_fishing.py
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 |
|
process_response(response)
staticmethod
It takes a response object from the requests
library and returns a tuple of two dictionaries.
The first dictionary is the JSON response from the API, and the second dictionary contains
metadata about the response
:param response: The response object returned by the requests library :type response: requests.models.Response :return: A tuple of two dictionaries.
Source code in ceurws/services/entity_fishing.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
process_single_doc_after_call(doc, result_from_ef_text)
- The function takes a document and a list of entities from the Entity-Fishing service.
- It then checks if there are any entities in the document that were not disambiguated by the Entity-Fishing service.
- If there are, it passes the text of these entities to the Entity-Fishing service again, but this time without the text of the document.
- It then merges the results of the two calls to the Entity-Fishing service and attaches the information from the Entity-Fishing service to the entities in the document
:param doc: The document to be processed :type doc: Doc :param result_from_ef_text: a list of three elements: :return: A list of dictionaries, each dictionary contains the information of a single entity.
Source code in ceurws/services/entity_fishing.py
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 |
|
updated_entities(doc, response)
The function
updated_entities
takes aDoc
object and a list of entities as input. It then iterates over the list of entities and updates theDoc
object with the information contained in the list of entities
:param doc: the document to be processed :type doc: Doc :param response: the response from the NERD API :type response: list
Source code in ceurws/services/entity_fishing.py
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 |
|
opentapioca
@author: https://github.com/UB-Mannheim/spacyopentapioca/blob/main/spacyopentapioca/entity_linker.py
EntityLinker
Sends raw data to the OpenTapioca API. Attaches entities to the document. Based on: https://github.com/UB-Mannheim/spacyopentapioca/blob/main/spacyopentapioca/entity_linker.py
Source code in ceurws/services/opentapioca.py
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 |
|
__call__(doc)
Requests the OpenTapioca API. Attaches entities to spans and doc.
Source code in ceurws/services/opentapioca.py
110 111 112 113 114 115 116 |
|
__init__(nlp, name, url)
Passes url. Registers OpenTapioca extensions for Doc and Span.
Source code in ceurws/services/opentapioca.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
pipe(stream, batch_size=128)
It takes a stream of documents, and for each batch of documents, it makes a request to the API for each document in the batch, and then yields the processed results of each document
:param stream: the stream of documents to be processed :param batch_size: The number of documents to send to the API in a single request, defaults to 128 (optional)
Source code in ceurws/services/opentapioca.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
sql_cache
Created on 2024-03-16 @author: wf
Cached
Manage cached entities.
Source code in ceurws/sql_cache.py
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 |
|
__init__(clazz, sparql, sql_db, query_name, max_errors=0, debug=False)
Initializes the Manager with class reference, SPARQL endpoint URL, SQL database connection string, query name, and an optional debug flag. Args: clazz (type[Any]): The class reference for the type of objects managed by this manager. sparql (SPARQL): a SPARQL endpoint. sql_db (SqlDB): SQL database object query_name (str): The name of the query to be executed. debug (bool, optional): Flag to enable debug mode. Defaults to False.
Source code in ceurws/sql_cache.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
check_local_cache()
Checks if there is data in the local cache (SQL database).
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if there is at least one record in the local SQL cache table |
Source code in ceurws/sql_cache.py
81 82 83 84 85 86 87 88 89 90 |
|
fetch_from_local()
Fetches data from the local SQL database.
Source code in ceurws/sql_cache.py
92 93 94 95 96 97 98 99 100 101 102 |
|
fetch_or_query(qm, force_query=False)
Fetches data from the local cache if available. If the data is not in the cache or if force_query is True, it queries via SPARQL and caches the results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qm |
QueryManager
|
The query manager object used for making SPARQL queries. |
required |
force_query |
bool
|
A flag to force querying via SPARQL even if the data exists in the local cache. Defaults to False. |
False
|
Source code in ceurws/sql_cache.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
get_lod(qm)
Fetches data using the SPARQL query specified by my query_name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qm |
QueryManager
|
The query manager object used for making SPARQL queries. |
required |
Returns: list[dict]: A list of dictionaries representing the data fetched.
Source code in ceurws/sql_cache.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
store(max_errors=None)
Stores the fetched data into the local SQL database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_errors |
int
|
Maximum allowed validation errors. Defaults to 0. |
None
|
Returns: list[Any]: A list of entity instances that were stored in the database.
Source code in ceurws/sql_cache.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
to_entities(max_errors=None)
Converts records fetched from the LOD into entity instances, applying validation. Args: max_errors (int, optional): Maximum allowed validation errors. Defaults to 0. Returns: list[Any]: A list of entity instances that have passed validation.
Source code in ceurws/sql_cache.py
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 |
|
SqlDB
general SQL database
Source code in ceurws/sql_cache.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
get_session()
Provide a session for database operations.
Returns:
Name | Type | Description |
---|---|---|
Session |
Session
|
A SQLAlchemy Session object bound to the engine for database operations. |
Source code in ceurws/sql_cache.py
25 26 27 28 29 30 31 32 |
|
textparser
Created on 2022-08-15
@author: wf
Textparser
general text parser
Source code in ceurws/textparser.py
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 |
|
__init__(debug)
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
debug(bool) |
if TRUE switch debugging on |
required |
Source code in ceurws/textparser.py
14 15 16 17 18 19 20 21 |
|
getMatch(pattern, text, groupNo=1)
get the match for the given regular expression for the given text returning the given group number
Parameters:
Name | Type | Description | Default |
---|---|---|---|
regexp(str) |
the regular expression to check |
required | |
text(str) |
the text to check |
required | |
groupNo(int) |
the number of the regular expression group to return |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
the matching result or None if no match was found |
Source code in ceurws/textparser.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
hasValue(d, key)
check that the given attribute in the given dict is available and not none
Parameters:
Name | Type | Description | Default |
---|---|---|---|
d(dict) |
the dict |
required | |
key(str) |
the key |
required |
Returns:
Name | Type | Description |
---|---|---|
True |
if a not None Value is available |
Source code in ceurws/textparser.py
58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
log(msg)
log the given message if debug is on
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg(str) |
the message to log |
required |
Source code in ceurws/textparser.py
48 49 50 51 52 53 54 55 56 |
|
sanitize(text, replaceList=None)
classmethod
sanitize given text
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
text to sanitize |
required | |
replaceList |
list of strings to remove from the given text |
None
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
sanitized string |
Source code in ceurws/textparser.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
urn
Created on 2023-12-28
@author: wf / ChatGPT-4 as instructed
Class URN is designed to verify and calculate check digits for URNs (Uniform Resource Names) as used in the DNB URN service. The class provides methods for both verifying a full URN's check digit (check_urn_checksum) and calculating the check digit for a given URN (calc_urn_checksum). It's adapted from PHP and JavaScript sources, following the guidelines and methods outlined by the DNB (German National Library) URN service.
URN
URN check digit calculator for DNB URN service:
see https://www.dnb.de/DE/Professionell/Services/URN-Service/urn-service_node.html
and https://d-nb.info/1045320641/34 http://nbn-resolving.de/nbnpruefziffer.php
Source code in ceurws/urn.py
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 |
|
calc_urn_checksum(test_urn, debug=False)
classmethod
converted from PHP and JavaScript code see see https://github.com/bohnelang/URN-Pruefziffer
Source code in ceurws/urn.py
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 |
|
utils
download
Created on 2021-08-21
this is a redundant copy see e.g. https://github.com/WolfgangFahl/ConferenceCorpus/blob/main/corpus/utils/download.py
@author: wf
Download
Utility functions for downloading data
Source code in ceurws/utils/download.py
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 |
|
downloadBackupFile(url, fileName, targetDirectory, force=False, profile=True)
staticmethod
Downloads from the given url the zip-file and extracts the file corresponding to the given fileName.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
url linking to a downloadable gzip file |
required |
fileName |
str
|
Name of the file that should be extracted from gzip file |
required |
targetDirectory(str) |
download the file to this directory |
required | |
force |
bool
|
True if the download should be forced |
False
|
profile(bool) |
if True show profiling information |
required |
Returns:
Type | Description |
---|---|
Name of the extracted file with path to the backup directory |
Source code in ceurws/utils/download.py
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 |
|
needsDownload(filePath, force=False)
staticmethod
check if a download of the given filePath is necessary that is the file does not exist has a size of zero or the download should be forced
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filePath(str) |
the path of the file to be checked |
required | |
force(bool) |
True if the result should be forced to True |
required |
Return
bool: True if a download for this file needed
Source code in ceurws/utils/download.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
Profiler
simple profiler
Source code in ceurws/utils/download.py
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 |
|
__init__(msg=None, profile=True)
construct me with the given msg and profile active flag
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg(str) |
the message to show if profiling is active |
required | |
profile(bool) |
True if messages should be shown |
required |
Source code in ceurws/utils/download.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
time(extraMsg='')
time the action and print if profile is active
Source code in ceurws/utils/download.py
114 115 116 117 118 119 120 121 |
|
webscrape
Created on 2020-08-20
@author: wf
this is a redundant copy of the sources at https://github.com/WolfgangFahl/ConferenceCorpus/blob/main/corpus/datasources/webscrape.py
ScrapeDescription
dataclass
Description of rdfa elements to scrape
Source code in ceurws/utils/webscrape.py
238 239 240 241 242 243 244 245 246 247 248 |
|
WebScrape
WebScraper with a rudimentary Parser for https://en.wikipedia.org/wiki/RDFa extended for CEUR-WS and WikiCFP specific scraping
https://stackoverflow.com/questions/21876602/what-does-the-html-typeof-attribute-do https://de.wikipedia.org/wiki/RDFa https://stackoverflow.com/questions/20767903/parsing-rdfa-in-html-xhtml https://www.w3.org/MarkUp/2009/rdfa-for-html-authors
Source code in ceurws/utils/webscrape.py
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 |
|
__init__(debug=False, showHtml=False, timeout=20, agent='Mozilla/5.0')
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
debug(bool) |
if True show debugging information |
required | |
showHtml(bool) |
if True show the HTML retrieved |
required | |
timeout(float) |
the default timeout |
required | |
agent(str) |
the agent to mimic |
required |
Source code in ceurws/utils/webscrape.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
findLinkForRegexp(regex)
find a link for the given regular expression
Parameters:
Name | Type | Description | Default |
---|---|---|---|
regex(str) |
the regular expression to find a link for |
required |
Return
m(object),text(str): the match/text tuple or None,None
Source code in ceurws/utils/webscrape.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
fromTag(soup, tag, attr=None, value=None, multi=False)
get metadata from a given tag, attribute and value e.g. DL4KG2020
tag=span, attr=class, value=CEURVOLACRONYM
Parameters:
Name | Type | Description | Default |
---|---|---|---|
soup(BeautifulSoup) |
the parser to work with |
required | |
tag(string) |
the tag to search |
required | |
attr(string) |
the attribute to expect |
required | |
value(string) |
the value to expect |
required | |
multi(bool) |
if True - return multiple values |
required |
Source code in ceurws/utils/webscrape.py
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 |
|
getSoup(url, showHtml=False, debug=False)
get the beautiful Soup parser
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url(str) |
the url to open |
required | |
showHtml(bool) |
if True the html code should be pretty printed and shown |
required | |
debug(bool) |
if True debug info should be printed |
required |
Return: BeautifulSoup: the html parser
Source code in ceurws/utils/webscrape.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
get_html_from_url(url, debug=False)
Get the html response from the given url Args: url: url to the get the content from debug(bool): if True show non available volumes
Returns:
Name | Type | Description |
---|---|---|
str |
str | bytes | None
|
content of the url as string |
bytes |
str | bytes | None
|
If the content of the url contains encoding errors |
None |
str | bytes | None
|
If the url is not reachable |
Source code in ceurws/utils/webscrape.py
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 |
|
get_soup_from_string(html, show_html=False)
get the beautiful Soup parser for the given html string
Parameters:
Name | Type | Description | Default |
---|---|---|---|
html |
str | bytes
|
html content to parse |
required |
show_html |
bool
|
True if the html code should be pretty printed and shown |
False
|
Returns:
Name | Type | Description |
---|---|---|
BeautifulSoup |
BeautifulSoup
|
the html parser |
Source code in ceurws/utils/webscrape.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
parseRDFa(url)
rudimentary RDFa parsing
Source code in ceurws/utils/webscrape.py
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 |
|
parseWithScrapeDescription(soup, scrapeDescr=None)
parse the given url with the given encoding Args: soup: html parser to parse the content from scrapeDescr: description of the
Return
a dict with the results
Source code in ceurws/utils/webscrape.py
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 |
|
printPrettyHtml(soup)
print the prettified html for the given soup
Parameters:
Name | Type | Description | Default |
---|---|---|---|
soup(BeuatifulSoup) |
the parsed html to print |
required |
Source code in ceurws/utils/webscrape.py
139 140 141 142 143 144 145 146 147 |
|
version
Created on 2022-09-11
@author: wf
Version
dataclass
Version handling for VolumeBrowser
Source code in ceurws/version.py
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 |
|
view
Created on 2024-02-23
@author: wf
View
generic View
Source code in ceurws/view.py
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 |
|
createExternalLink(row, key, text, formatterUrl, emptyIfNone=False)
create an ExternalLink for the given row entry with the given key, text and formatterUrl
Parameters:
Name | Type | Description | Default |
---|---|---|---|
row(dict) |
the row to extract the value from |
required | |
key(str) |
the key |
required | |
text(str) |
the text to display for the link |
required | |
formatterUrl(str) |
the prefix for the url to use |
required | |
emptyIfNone(bool) |
if True return empty string if value is Display.noneValue |
required |
Returns:
Type | Description |
---|---|
str
|
str - html link for external id |
Source code in ceurws/view.py
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 |
|
createItemLink(row, key, separator=None)
create an item link Args: row: row object with the data key: key of the value for which the link is created separator: If not None split the value on the separator and create multiple links
Source code in ceurws/view.py
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 |
|
createLink(url, text)
create a link from the given url and text
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url(str) |
the url to create a link for |
required | |
text(str) |
the text to add for the link |
required |
Source code in ceurws/view.py
33 34 35 36 37 38 39 40 41 42 |
|
volume_neo4j
Editor
dataclass
Represents an editor with their name and ORCID.
Source code in ceurws/volume_neo4j.py
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 |
|
create_node(tx, volume_node_id)
Create an Editor node in Neo4j and establish a relationship with a Volume node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tx |
The Neo4j transaction. |
required | |
volume_node_id |
int
|
The ID of the volume node. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int | None
|
The ID of the created Editor node. |
None |
int | None
|
if the editor could not be created |
Source code in ceurws/volume_neo4j.py
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 |
|
from_json(json_data)
classmethod
Create an Editor instance from JSON data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
json_data |
dict
|
The JSON data representing the editor. |
required |
Returns:
Name | Type | Description |
---|---|---|
Editor |
The Editor instance created from the JSON data. |
Source code in ceurws/volume_neo4j.py
199 200 201 202 203 204 205 206 207 208 209 210 |
|
search_by_name()
Search the editor by name using the ORCID API and calculate the likelihood.
Source code in ceurws/volume_neo4j.py
212 213 214 215 216 217 218 219 220 221 222 223 |
|
Location
dataclass
Source code in ceurws/volume_neo4j.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
parse(location_str)
staticmethod
Parse a location string of the format "City, Country, Date"
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_str |
str
|
The location string to parse. |
required |
Returns:
Type | Description |
---|---|
Optional[Location]
|
A Location object or None if the string could not be parsed. |
Source code in ceurws/volume_neo4j.py
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
|
Neo4j
Neo4j wrapper class
Source code in ceurws/volume_neo4j.py
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 |
|
__init__(host=socket.gethostbyname(socket.gethostname()), bolt_port=7687, auth=('neo4j', 'password'), scheme='bolt', encrypted=False)
constructor
Source code in ceurws/volume_neo4j.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
Volume
dataclass
Represents a volume with its attributes.
Source code in ceurws/volume_neo4j.py
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 |
|
create_node(tx)
Create a Volume node in Neo4j.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tx |
The Neo4j transaction. |
required |
Returns:
Name | Type | Description |
---|---|---|
int |
int | None
|
The ID of the created node. |
None |
int | None
|
if the node was not created |
Source code in ceurws/volume_neo4j.py
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 |
|
default_source()
classmethod
get the default source
Source code in ceurws/volume_neo4j.py
140 141 142 143 144 145 146 |
|
from_json(json_data)
classmethod
Create a Volume instance from JSON data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
json_data |
dict
|
The JSON data representing the volume. |
required |
Returns:
Name | Type | Description |
---|---|---|
Volume |
The Volume instance created from the JSON data. |
Source code in ceurws/volume_neo4j.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
load_json_file(source)
staticmethod
Load volumes from the source JSON file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source |
str
|
Path to the source JSON file. |
required |
Returns:
Type | Description |
---|---|
list[Volume]
|
List[Volume]: The list of loaded volumes. |
Source code in ceurws/volume_neo4j.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
parse_args(argv=None)
classmethod
Parse command line arguments.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
argv(list) |
command line arguments |
required |
Returns:
Type | Description |
---|---|
argparse.Namespace: The parsed command line arguments. |
Source code in ceurws/volume_neo4j.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
volume_view
Created on 2024-02-23
@author: wf
VolumeListView
Bases: View
show a list of volumes a table
Source code in ceurws/volume_view.py
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 |
|
__init__(solution, parent)
constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
solution |
the solution |
required | |
parent |
the parent UI container |
required |
Source code in ceurws/volume_view.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
add_msg(html_markup)
add the given html_markup message to the log_view
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg(str) |
the html formatted message to add |
required |
Source code in ceurws/volume_view.py
269 270 271 272 273 274 275 276 277 |
|
add_or_update_volume_in_wikidata(volume)
add the given volume to wikidata or update it if it already exists
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(Volume) |
the CEUR-WS volume to update proceedings and event entries for |
required |
Source code in ceurws/volume_view.py
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
|
check_recently_updated_volumes()
check recently updated volumes
Source code in ceurws/volume_view.py
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 |
|
clear_msg(msg='')
clear the log_view with the given message
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg(str) |
the message to display |
required |
Source code in ceurws/volume_view.py
259 260 261 262 263 264 265 266 267 |
|
createEventItemAndLinkProceedings(volume, proceedingsWikidataId=None)
Create event wikidata item for given volume and link the proceedings with the event
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(Volume) |
the volume for which to create the event item |
required | |
proceedingsWikidataId |
str | None
|
wikidata id of the proceedings |
None
|
Source code in ceurws/volume_view.py
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 |
|
createProceedingsItemFromVolume(volume)
Create wikidata item for proceedings of given volume
Source code in ceurws/volume_view.py
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 |
|
get_volume_lod()
get the list of dict of all volumes
Source code in ceurws/volume_view.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
|
onWikidataButtonClick(_args)
async
handle wikidata sync request
Source code in ceurws/volume_view.py
296 297 298 299 300 301 |
|
on_check_recently_update_volumes_button_click(args)
async
handle clicking of the refresh button to get recently added volumes
Source code in ceurws/volume_view.py
336 337 338 339 340 |
|
optional_login()
check if we need to login
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if write is enabled |
Source code in ceurws/volume_view.py
402 403 404 405 406 407 408 409 410 411 412 |
|
setup_ui()
show my volumes as a list
Source code in ceurws/volume_view.py
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 |
|
updateRecentlyAddedVolume(volume, index, total)
update a recently added Volume
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(Volume) |
the volume to update |
required | |
index(int) |
the relative index of the volume currently being added |
required | |
total(int) |
the total number of volumes currently being added |
required |
Source code in ceurws/volume_view.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
|
updateWikidataVolumes(selected_rows)
update wikidata volumes for the selected rows
Source code in ceurws/volume_view.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
|
VolumeView
Bases: View
displays a single volume
Source code in ceurws/volume_view.py
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 |
|
__init__(solution, parent)
constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
solution |
the solution |
required | |
parent |
the parent UI container |
required |
Source code in ceurws/volume_view.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
onWikidataButtonClick(_args)
async
handle wikidata sync request
Source code in ceurws/volume_view.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|
setup_ui()
setup my User Interface elements
Source code in ceurws/volume_view.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
showVolume(volume)
show the given volume
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(Volume) |
the volume to show |
required |
Source code in ceurws/volume_view.py
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 |
|
updateWikidataSpan(qId, volume)
create a Wikidata Export span
Parameters:
Name | Type | Description | Default |
---|---|---|---|
a() |
ancestor |
required | |
qId(str) |
wikidata item Q Identifier |
required | |
volume(Volume) |
the Volume |
required |
Source code in ceurws/volume_view.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
volumeparser
Created on 2022-08-14
@author: wf
VolumePageCache
Cache interface for ceur-ws volume pages
Source code in ceurws/volumeparser.py
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 499 500 501 502 503 504 505 506 507 508 509 |
|
cache(number, html)
classmethod
cache the volume page corresponding to the given number Args: number: number of the volume to cache html: html of the volume page to cache
Source code in ceurws/volumeparser.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
|
delete(number)
classmethod
Delete the cache corresponding to the given volume number Args: number: volume number
Source code in ceurws/volumeparser.py
500 501 502 503 504 505 506 507 508 509 |
|
get(number)
classmethod
Get the cached volume page of the given volume number. If the volume page is not cached None is returned. Args: number: volume number to retrieve
Returns:
Name | Type | Description |
---|---|---|
str |
str | bytes | None
|
cached volume page |
bytes |
str | bytes | None
|
if the cached volume page contains encoding errors |
None |
str | bytes | None
|
if no volume with the given number is cached |
Source code in ceurws/volumeparser.py
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
|
is_cached(number)
classmethod
Check if the volume page of the given volume number is cached Args: number: volume number of the volume page
Returns:
Type | Description |
---|---|
bool
|
True if the corresponding volume page is cached |
Source code in ceurws/volumeparser.py
441 442 443 444 445 446 447 448 449 450 451 |
|
VolumeParser
Bases: Textparser
CEUR-WS VolumeParser
Source code in ceurws/volumeparser.py
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 |
|
__init__(baseurl='http://ceur-ws.org', timeout=3, showHtml=False, debug=False)
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
baseurl(str) |
the baseurl of the CEUR-WS website, |
required | |
timeout(float) |
the number of seconds to wait |
required | |
showHtml(bool) |
if True show the HTML code |
required | |
debug(bool) |
if True switch debugging on |
required |
Source code in ceurws/volumeparser.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
check_parsed_dict(parsed_dict)
check parsed_dict content e.g. urn check digit
Source code in ceurws/volumeparser.py
128 129 130 131 132 133 134 135 136 137 138 139 |
|
getSoup(url)
get the beautiful Soup parser for the given url Args: url: url to parse
Returns:
Type | Description |
---|---|
BeautifulSoup | None
|
parsed webpage |
Source code in ceurws/volumeparser.py
60 61 62 63 64 65 66 67 68 69 |
|
get_volume_page(number, recache=False)
Get the html content of the given volume number. Retrieves the volume page from cache or from ceur-ws.org Caches the volume page if not already cached Args: number: volume number recache: If True update the cache with a new fetch from the web. Otherwise, cache is used if present
Returns:
Type | Description |
---|---|
str | bytes | None
|
html of volume page or None if the volume page is not found |
Source code in ceurws/volumeparser.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
get_volume_soup(number, use_cache=True)
Get Soup of the volume page for the given volume number Args: number: volume number of the volume to parse use_cache: If True use volume page from cache if present otherwise load from web and cache
Returns:
Name | Type | Description |
---|---|---|
BeautifulSoup |
BeautifulSoup | None
|
soup of the volume page |
None |
BeautifulSoup | None
|
soup can not be loaded from cache or from web |
Source code in ceurws/volumeparser.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
parse(url)
parse the given url Args: url: URL to parse the volume information from
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
extracted information |
Source code in ceurws/volumeparser.py
141 142 143 144 145 146 147 148 149 150 151 152 |
|
parseAffiliationMap(start)
Parse out the affiliations and their reference key Args: start:
Returns:
Type | Description |
---|---|
dict
|
dict |
Source code in ceurws/volumeparser.py
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 |
|
parseEditors(soup)
parse all editor information contained in the given soup parse all information between Edited by ...
Args: soup: volume web page
Source code in ceurws/volumeparser.py
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 |
|
parseRDFa(soup)
tries to parse rdfa content from the given soup Args: soup: html parser to extract the content from
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
dict with the extracted content |
Source code in ceurws/volumeparser.py
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 |
|
parse_soup(soup, number=None)
parse the volume page data from the given soup
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number(str) |
the volume number |
required | |
soup(BeautifulSoup) |
html parser to extract the content from |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
parsed content |
Source code in ceurws/volumeparser.py
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 |
|
parse_volume(number, use_cache=True)
parse the given volume caches the volume pages at ~/.ceurws/volumes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
number |
int
|
volume number of the volume to parse |
required |
use_cache |
bool
|
If True use volume page from cache if present otherwise load from web and cache |
True
|
Returns:
Name | Type | Description |
---|---|---|
dict |
tuple[dict, BeautifulSoup | None]
|
extracted information |
Source code in ceurws/volumeparser.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
volumeUrl(volnumber)
get the url for the given volume number
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volnumber(str) |
the volume number |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
url - the url of the volume |
Source code in ceurws/volumeparser.py
46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
webserver
Created on 2024-02-22
@author: wf
CeurWsSolution
Bases: InputWebSolution
CEUR-WS Volume browser solution
Source code in ceurws/webserver.py
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 |
|
__init__(webserver, client)
Initialize the solution
Calls the constructor of the base solution Args: webserver (CeurWsWebServer): The webserver instance associated with this context. client (Client): The client instance this context is associated with.
Source code in ceurws/webserver.py
238 239 240 241 242 243 244 245 246 247 248 |
|
home()
async
home page selection
Source code in ceurws/webserver.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
|
prepare_ui()
prepare the user interface
Source code in ceurws/webserver.py
255 256 257 258 259 |
|
volume_selected(args)
async
when a volume is selected show the details in the Volume View
Source code in ceurws/webserver.py
318 319 320 321 322 323 324 325 |
|
volumes()
async
show the volumes table
Source code in ceurws/webserver.py
287 288 289 290 291 292 293 294 295 |
|
wikidatasync()
async
show the wikidata sync table
Source code in ceurws/webserver.py
277 278 279 280 281 282 283 284 285 |
|
CeurWsWebServer
Bases: InputWebserver
webserver
Source code in ceurws/webserver.py
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 |
|
__init__()
constructor
Source code in ceurws/webserver.py
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 |
|
configure_run()
configure command line specific details
Source code in ceurws/webserver.py
223 224 225 226 227 228 |
|
wikidata_view
Created on 2024-02-23
@author: wf
WikidataView
Bases: View
Wikidata View
Source code in ceurws/wikidata_view.py
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 |
|
__init__(solution, parent)
constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
solution |
the solution |
required | |
parent |
the parent UI container |
required |
Source code in ceurws/wikidata_view.py
20 21 22 23 24 25 26 27 28 29 30 31 |
|
on_refresh_button_click()
async
handle the refreshing of the proceedings from wikidata
Source code in ceurws/wikidata_view.py
97 98 99 100 101 |
|
reload_aggrid(olod)
reload my aggrid with the list of Volumes
Source code in ceurws/wikidata_view.py
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 |
|
setup_ui()
setup my User Interface elements
Source code in ceurws/wikidata_view.py
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 |
|
update_proceedings()
async
update the cached proceedings
Source code in ceurws/wikidata_view.py
33 34 35 36 37 38 39 40 41 42 43 |
|
wikidatasync
Created on 2022-08-14
@author: wf
WikidataSync
synchronize with wikidata
Source code in ceurws/wikidatasync.py
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 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
|
__init__(baseurl='https://www.wikidata.org', debug=False, dblp_endpoint_url=None)
Constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
baseurl(str) |
the baseurl of the wikidata endpoint |
required | |
debug(bool) |
if True switch on debugging |
required | |
dblp_endpoint_url |
str | None
|
sparql endpoint url of dblp |
None
|
Source code in ceurws/wikidatasync.py
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 |
|
addAcronymToItem(itemId, acronym, desc=None, label=None, write=True, ignoreErrors=False)
add the acronym to the given item Args: itemId: item to add the acronym to acronym(str): acronym of the item write(bool): if True actually write ignoreErrors(bool): if True ignore errors
Returns:
Type | Description |
---|---|
(qid, errors) id of the created entry and occurred errors |
Source code in ceurws/wikidatasync.py
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
|
addDblpPublicationId(volumeNumber, dblpRecordId=None, write=True, ignoreErrors=False)
try to add the dblp publication id (P8978) to the proceedings record Args: volumeNumber: ceurws volumenumber of the proceedings dblpRecordId: dblp record id to add to the proceedings item. If None query dblp for the record id write: if True actually write ignoreErrors(bool): if True ignore errors
Returns:
Name | Type | Description |
---|---|---|
WikidataResult |
WikidataResult
|
the result of the add operation |
Source code in ceurws/wikidatasync.py
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 |
|
addLinkBetweenProceedingsAndEvent(eventItemQid, volumeNumber=None, proceedingsWikidataId=None, write=True, ignoreErrors=False)
add the link between the wikidata proceedings item and the given event wikidata item Args: volumeNumber: ceurws volume number of the proceedings eventItemQid: wikidata Qid of the event proceedingsWikidataId: wikidata id of the proceedings item write(bool): if True actually write ignoreErrors(bool): if True ignore errors
Returns:
Name | Type | Description |
---|---|---|
WikidataResult |
WikidataResult
|
the result of the add operation |
Raises:
Type | Description |
---|---|
ValueError
|
if the volume number is not provided or the volume is not unique in Wikidata |
Source code in ceurws/wikidatasync.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 |
|
addOfficialWebsiteToItem(itemId, officialWebsite, write=True, ignoreErrors=False)
add the official website to the given item Args: itemId: item to add the acronym to officialWebsite(str): officialWebsite of the item write(bool): if True actually write ignoreErrors(bool): if True ignore errors
Returns:
Name | Type | Description |
---|---|---|
WikidataResult |
the result of the add operation |
Source code in ceurws/wikidatasync.py
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 |
|
addProceedingsToWikidata(record, write=True, ignoreErrors=False)
Creates a wikidata entry for the given record
Parameters:
Name | Type | Description | Default |
---|---|---|---|
record(dict) |
the data to add |
required | |
write(bool) |
if True actually write |
required | |
ignoreErrors(bool) |
if True ignore errors |
required |
Source code in ceurws/wikidatasync.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
|
addVolume(volume)
add the given volume
Parameters:
Name | Type | Description | Default |
---|---|---|---|
volume(Volume) |
the volume to add |
required |
Source code in ceurws/wikidatasync.py
144 145 146 147 148 149 150 151 152 153 |
|
checkIfProceedingsFromExists(volumeNumber, eventItemQid)
Returns True if the is proceedings from relation already exists between the given proceedings and event
Source code in ceurws/wikidatasync.py
486 487 488 489 490 491 492 493 494 |
|
doAddEventToWikidata(record, write=True, ignoreErrors=False)
Creates a wikidata event entry for the given record Args: record(dict): the data to add write(bool): if True actually write ignoreErrors(bool): if True ignore errors
Returns:
Name | Type | Description |
---|---|---|
WikidataResult |
the result of the add operation |
Source code in ceurws/wikidatasync.py
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
|
doAddProceedingsToWikidata(record, write=True, ignoreErrors=False)
Creates a wikidata proceedings entry for the given record
Parameters:
Name | Type | Description | Default |
---|---|---|---|
record(dict) |
the data to add |
required | |
write(bool) |
if True actually write |
required | |
ignoreErrors(bool) |
if True ignore errors |
required |
Returns: WikidataResult: the result of the add operation
Source code in ceurws/wikidatasync.py
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 |
|
doCreateEventItemAndLinkProceedings(volume, proceedingsWikidataId=None, write=False)
Create event wikidata item for given volume and link the proceedings with the event Args: volume: volume to create the event for proceedingsWikidataId: proceedings wikidata id of the event write: If True actually write
Returns:
Type | Description |
---|---|
dict[str, WikidataResult]
|
proceedingsQId, eventQId, msg |
Source code in ceurws/wikidatasync.py
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
|
from_args(args)
classmethod
create a WikidataSync object from the given command line arguments
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args(Namespace) |
the command line arguments |
required |
Source code in ceurws/wikidatasync.py
59 60 61 62 63 64 65 66 67 68 69 70 |
|
from_endpoint_names(wd_en, dblp_en, debug=False)
classmethod
create a WikidataSync object from the given endpoint names
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wd_en(str) |
wikidata endpoint name |
required | |
dblp_en(str) |
dblp endpoint name |
required |
Source code in ceurws/wikidatasync.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
getAuthorByIds(identifiers)
Based on the given identifiers get potential author items the names of the identifiers must be according to DblpAuthorIdentifier Args: identifiers: known identifiers of the author
Source code in ceurws/wikidatasync.py
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
|
getEventNameFromTitle(title)
classmethod
Get the event name from the given proceedings title Args: title: title of the proceeding
Returns:
Type | Description |
---|---|
str
|
name of the event |
Source code in ceurws/wikidatasync.py
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 |
|
getEventTypeFromTitle(title)
classmethod
Extract the event type from the given title Assumption: lowest mentioned type is the correct one Args: title: title of the event
Returns:
Type | Description |
---|---|
tuple[str | None, str | None]
|
wikidata id and label of the event type |
Source code in ceurws/wikidatasync.py
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 |
|
getEventWdItemsByUrn(urn)
queries the wikidata proceedings that have the given urn assigned to P4109 and returns the assigned event Args: urn: URN id to query for
Returns:
Type | Description |
---|---|
list[str]
|
List of corresponding wikidata item ids or empty list of no matching item is found |
Source code in ceurws/wikidatasync.py
325 326 327 328 329 330 331 332 333 334 335 336 337 |
|
getEventsOfProceedings(itemId)
get the item ids of the events the given proceedings ids is the proceedings from Args: itemId: Qid of the proceedings
Returns:
Type | Description |
---|---|
list[str]
|
List of the events |
Source code in ceurws/wikidatasync.py
339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
getEventsOfProceedingsByVolnumber(volnumber)
get the item ids of the events the given proceedings ids is the proceedings from Args: volnumber: Volume number of the proceedings
Returns:
Type | Description |
---|---|
list[str]
|
List of the events |
Source code in ceurws/wikidatasync.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
|
getProceedingWdItemsByUrn(urn)
queries the wikidata items that have the given urn for the property P4109 Args: urn: URN id to query for
Returns:
Type | Description |
---|---|
list[str]
|
List of corresponding wikidata item ids or empty list of no matching item is found |
Source code in ceurws/wikidatasync.py
311 312 313 314 315 316 317 318 319 320 321 322 323 |
|
getProceedingsForVolume(searchVolnumber)
get the proceedings record for the given searchVolnumber
Parameters:
Name | Type | Description | Default |
---|---|---|---|
searchVolnumber(int) |
the number of the volume to search |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict | None
|
the record for the proceedings in wikidata |
None |
dict | None
|
if the proceeding record in not found for the given searchVolnumber |
Source code in ceurws/wikidatasync.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
|
getRecentlyAddedVolumeList()
get the list of volumes that have recently been added we do not expect deletions
Returns:
Type | Description |
---|---|
tuple[dict[int, dict], list[dict]]
|
list[int]: list of volume numbers recently added |
Source code in ceurws/wikidatasync.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
getWikidataEventRecord(volume)
get the wikidata Record for the given volume
Source code in ceurws/wikidatasync.py
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 |
|
getWikidataIdByDblpEventId(entityId, volumeNumber=None)
query wikidata for the qId of items that correspond to the given dblpEventId Args: entityId: id of a dblp event volumeNumber: volume number
Returns:
Type | Description |
---|---|
list[str]
|
list of matching wikidata items |
Source code in ceurws/wikidatasync.py
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
|
getWikidataIdByVolumeNumber(number)
query wikidata for the qId of the proceedings of the given volume number Args: number: volume number
Returns:
Name | Type | Description |
---|---|---|
str |
str | None
|
wikidata id corresponding to the given volume number |
None |
str | None
|
if the corresponding wikidata id was not found |
Source code in ceurws/wikidatasync.py
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
|
getWikidataProceedingsRecord(volume)
get the wikidata Record for the given volume
Source code in ceurws/wikidatasync.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
hasItemPropertyValueFor(item, propertyId)
ask wikidata if the given item has a value for the given property Args: item: item Qid propertyId: property Pid Returns: True if the item has the property else False
Source code in ceurws/wikidatasync.py
496 497 498 499 500 501 502 503 504 505 506 |
|
loadProceedingsFromCache()
load the proceedings records from the cache
Source code in ceurws/wikidatasync.py
278 279 280 281 282 283 284 |
|
preparePaperManager()
prepare my paper Manager
Source code in ceurws/wikidatasync.py
116 117 118 119 120 121 122 123 124 125 126 127 |
|
prepareVolumeManager()
prepare my volume manager
Source code in ceurws/wikidatasync.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
removeWdPrefix(value)
classmethod
removes the wikidata entity prefix Args: value: wikidata entity url
Source code in ceurws/wikidatasync.py
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 |
|
storeVolumes()
store my volumes
Source code in ceurws/wikidatasync.py
175 176 177 178 179 |
|
update(withStore=True)
update my table from the Wikidata Proceedings SPARQL query
Source code in ceurws/wikidatasync.py
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 |
|
workshop
Created on 2020-11-12
@author: wf
Workshop
a single Workshop
Source code in ceurws/workshop.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
__init__()
Constructor
Source code in ceurws/workshop.py
17 18 19 20 |
|