Skip to content

Commit

Permalink
Some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolamilosevic86 committed Nov 8, 2016
1 parent 264166a commit 29899e0
Show file tree
Hide file tree
Showing 12 changed files with 26,910 additions and 26,807 deletions.
18,332 changes: 9,166 additions & 9,166 deletions annotation/from_NER/009575f9-74e8-4a6d-9fa6-3cae72fd01c3.txt-PROCESSED.xml

Large diffs are not rendered by default.

21,966 changes: 10,983 additions & 10,983 deletions annotation/from_NER/01243d39-ccf2-43ce-b9bf-b445b9c22c75.txt-PROCESSED.xml

Large diffs are not rendered by default.

12,942 changes: 6,471 additions & 6,471 deletions annotation/from_NER/b3e740ad-46d9-48f5-85ab-7c319919ceb1.txt-PROCESSED.xml

Large diffs are not rendered by default.

Empty file modified annotation/scripts/check_annotated_setIDs.sh 100755 → 100644
Empty file.
Empty file modified annotation/scripts/get_NER_output.sh 100755 → 100644
Empty file.
Empty file modified annotation/scripts/setup_NER.sh 100755 → 100644
Empty file.
302 changes: 151 additions & 151 deletions annotation/to_NER/009575f9-74e8-4a6d-9fa6-3cae72fd01c3.txt

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions annotation/to_NER/01243d39-ccf2-43ce-b9bf-b445b9c22c75.txt
Expand Up @@ -13,7 +13,7 @@
159 Protease inhibitor:  ritonavir 01243d39-ccf2-43ce-b9bf-b445b9c22c75
196 ? posaconazole concentration 01243d39-ccf2-43ce-b9bf-b445b9c22c75
211 ? calcium channel blocker 01243d39-ccf2-43ce-b9bf-b445b9c22c75
152 "Fosamprenavir (unboosted): Appropriate doses of fosamprenavir and ATRIPLA with respect to safety and efficacy have not been established.
152 "Fosamprenavir (unboosted): Appropriate doses of fosamprenavir and ATRIPLA with respect to safety and efficacy have not been established.
Fosamprenavir/ritonavir: An additional 100 mg/day (300 mg total) of ritonavir is recommended when ATRIPLA is administered with fosamprenavir/ritonavir once daily. No change in the ritonavir dose is required when ATRIPLA is administered with fosamprenavir plus ritonavir twice daily." 01243d39-ccf2-43ce-b9bf-b445b9c22c75
187 ? sertraline concentration 01243d39-ccf2-43ce-b9bf-b445b9c22c75
230 Coadministration of efavirenz in HIV-1 infected individuals with a history of injection drug use resulted in decreased plasma levels of methadone and signs of opiate withdrawal. Methadone dose was increased by a mean of 22% to alleviate withdrawal symptoms. Patients should be monitored for signs of withdrawal and their methadone dose increased as required to alleviate withdrawal symptoms. 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -115,7 +115,7 @@
349 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
266 Ritonavir 01243d39-ccf2-43ce-b9bf-b445b9c22c75
310 600 mg qd × 15 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
369 "? 17
369 "? 17
(? 6 to? 29)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
303 600 mg qd × 7 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
335 ? 47(? 41 to ? 53) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -144,7 +144,7 @@
293 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
325 14 01243d39-ccf2-43ce-b9bf-b445b9c22c75
251 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
361 "? 14#
361 "? 14#
(? 7 to? 21)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
279 ? 14(? 2 to ? 24) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
245 Indinavir 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -205,11 +205,11 @@
532 Atorvastatin 01243d39-ccf2-43ce-b9bf-b445b9c22c75
651 Sertraline 01243d39-ccf2-43ce-b9bf-b445b9c22c75
671 NA 01243d39-ccf2-43ce-b9bf-b445b9c22c75
440 "? 39
440 "? 39
(? 3 to ? 62)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
480 ? 50(? 28 to ? 66) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
587 ? 63(? 44 to? 75) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
432 "? 57
432 "? 57
(? 50 to? 63)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
472 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
580 ? 13(? 30 to? 7) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -238,7 +238,7 @@
501 ? 49(? 32 to ? 69) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
536 ? 14(? 1 to? 26) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
653 600 mg qd × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
676 "? 23
676 "? 23
(? 1 to ? 53" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
444 10 01243d39-ccf2-43ce-b9bf-b445b9c22c75
553 Simvastatin 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -250,7 +250,7 @@
491 500 mg q12h × 7 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
529 ? 32(? 15 to? 46) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
649 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
670 "? 55
670 "? 55
(? 45 to ? 62)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
428 After evening dose 01243d39-ccf2-43ce-b9bf-b445b9c22c75
466 ? 18(? 6 to ? 33) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -261,7 +261,7 @@
639 600 mg qd × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
666 300 mg po q12h days 2–7 01243d39-ccf2-43ce-b9bf-b445b9c22c75
614 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
397 "? 39
397 "? 39
(? 2 to? 88)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
515 ? 35(? 12 to ? 52) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
550 ? 32(? 59 to? 12) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -309,7 +309,7 @@
502 ? 34(? 18 to? 53) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
537 ? 43(? 34 to? 50) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
654 13 01243d39-ccf2-43ce-b9bf-b445b9c22c75
677 "? 7
677 "? 7
(? 23 to ? 13)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
445 ? 21(? 10 to? 33) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
554 40 mg qd × 4 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -320,7 +320,7 @@
492 400 mg qd × 7 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
530 ? 38(? 28 to? 47) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
650 NA 01243d39-ccf2-43ce-b9bf-b445b9c22c75
430 "? 29
430 "? 29
(? 11 to? 43)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
467 ? 42(? 9 to ? 86)# 01243d39-ccf2-43ce-b9bf-b445b9c22c75
578 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -332,12 +332,12 @@
457 600 mg qd × 10 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
568 200 mg qd × 3 days, 200 mg bid × 3 days, then 400 mg qd × 29 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
615 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
398 "? 48
398 "? 48
(? 24 to? 76)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
516 ? 37(? 14 to? 55) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
633 11 01243d39-ccf2-43ce-b9bf-b445b9c22c75
662 ? 61à 01243d39-ccf2-43ce-b9bf-b445b9c22c75
417 "? 33
417 "? 33
(? 26 to? 39)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
390 ? 74(? 68 to? 78) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
506 600 mg qd × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -360,9 +360,9 @@
489 ? 45(? 28 to ? 57) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
527 600 mg qd × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
644 Hydroxybupropion 01243d39-ccf2-43ce-b9bf-b445b9c22c75
669 "? 36è
669 "? 36è
(? 21 to ? 49)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
424 "? 37
424 "? 37
(? 26 to? 46)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
463 After AM dose 01243d39-ccf2-43ce-b9bf-b445b9c22c75
572 ? 27(? 20 to? 33) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -386,20 +386,20 @@
555 600 mg qd × 15 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
599 ? 28(? 7 to? 44) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
531 ? 45(? 31 to? 56) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
439 "? 19
439 "? 19
(? 36 to ? 3)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
479 12 01243d39-ccf2-43ce-b9bf-b445b9c22c75
586 ? 69(? 55 to? 79) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
493 11 01243d39-ccf2-43ce-b9bf-b445b9c22c75
431 "? 46
431 "? 46
(? 37 to? 54)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
470 After PM dose 01243d39-ccf2-43ce-b9bf-b445b9c22c75
579 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
627 ? 80(?77 to? 83) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
486 12 01243d39-ccf2-43ce-b9bf-b445b9c22c75
524 NA 01243d39-ccf2-43ce-b9bf-b445b9c22c75
641 ? 34(?21 to ?47) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
418 "? 39
418 "? 39
(? 24 to? 51)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
569 600 mg qd × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
616 Norelgestromin 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -426,15 +426,15 @@
490 Clarithromycin 01243d39-ccf2-43ce-b9bf-b445b9c22c75
528 9 01243d39-ccf2-43ce-b9bf-b445b9c22c75
648 ? 50(? 20 to? 80) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
425 "? 52
425 "? 52
(? 47 to? 57)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
465 ? 24(? 12 to? 38) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
573 ? 35(? 24 to? 44) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
622 ? 82(? 79 to? 85) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
483 Maraviroc 01243d39-ccf2-43ce-b9bf-b445b9c22c75
521 11 01243d39-ccf2-43ce-b9bf-b445b9c22c75
638 150 mg single dose(sustained-release) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
396 "? 14†
396 "? 14†
(? 17 to? 58)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
511 Hydroxy-itraconazole 01243d39-ccf2-43ce-b9bf-b445b9c22c75
549 13 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down Expand Up @@ -473,7 +473,7 @@
693 33 01243d39-ccf2-43ce-b9bf-b445b9c22c75
705 14 01243d39-ccf2-43ce-b9bf-b445b9c22c75
699 25 01243d39-ccf2-43ce-b9bf-b445b9c22c75
738 "? 23
738 "? 23
(? 46 to ? 10)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
730 ? 21(? 27 to ? 14) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
747 24 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand All @@ -490,7 +490,7 @@
732 ? 40(? 48 to ? 32) 01243d39-ccf2-43ce-b9bf-b445b9c22c75
749 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
743 ? 01243d39-ccf2-43ce-b9bf-b445b9c22c75
737 "? 25¶
737 "? 25¶
(? 42 to ? 3)" 01243d39-ccf2-43ce-b9bf-b445b9c22c75
729 34 01243d39-ccf2-43ce-b9bf-b445b9c22c75
746 Lopinavir/ritonavir 400/100 twice daily × 14 days 01243d39-ccf2-43ce-b9bf-b445b9c22c75
Expand Down
26 changes: 13 additions & 13 deletions annotation/to_NER/b3e740ad-46d9-48f5-85ab-7c319919ceb1.txt
Expand Up @@ -4,7 +4,7 @@
1055 Antifungals: b3e740ad-46d9-48f5-85ab-7c319919ceb1
1002 ?Nelfinavir M8 Metabolite?Nelfinavir Cmin b3e740ad-46d9-48f5-85ab-7c319919ceb1
1049 Rifampin b3e740ad-46d9-48f5-85ab-7c319919ceb1
1082 "Motility agents:
1082 "Motility agents:
Cisapride" b3e740ad-46d9-48f5-85ab-7c319919ceb1
995 Indinavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
988 Do not co-administer nevirapine with atazanavir because nevirapine substantially decreases atazanavir exposure and there is a potential risk for nevirapine-associated toxicity due to increased nevirapine exposures. b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand All @@ -21,7 +21,7 @@
1053 Plasma concentrations of nevirapine and the anticonvulsant may be decreased. b3e740ad-46d9-48f5-85ab-7c319919ceb1
999 ?Lopinavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
1046 Rifabutin b3e740ad-46d9-48f5-85ab-7c319919ceb1
1079 "Immunosuppressants:
1079 "Immunosuppressants:
Cyclosporine, tacrolimus, sirolimus" b3e740ad-46d9-48f5-85ab-7c319919ceb1
992 Fosamprenavir/Ritonavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
983 HIV Antiviral Agents: Protease Inhibitors (PIs) b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand All @@ -36,7 +36,7 @@
1050 ? Nevirapine b3e740ad-46d9-48f5-85ab-7c319919ceb1
1083 Plasma concentrations may be decreased. b3e740ad-46d9-48f5-85ab-7c319919ceb1
996 ? Indinavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
1076 "Ergot alkaloids:
1076 "Ergot alkaloids:
Ergotamine" b3e740ad-46d9-48f5-85ab-7c319919ceb1
989 Fosamprenavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
1091 Ethinyl estradiol and Norethindrone b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand All @@ -49,18 +49,18 @@
1024 Nevirapine and telaprevir should not be coadministered because changes in plasma concentrations of nevirapine, telaprevir, or both may result in a reduction in telaprevir efficacy or an increase in nevirapine-associated adverse events. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1062 ? Ketoconazole b3e740ad-46d9-48f5-85ab-7c319919ceb1
1054 Use with caution and monitor virologic response and levels of anticonvulsants. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1000 "Dosing in adult patients:
A dose adjustment of lopinavir/ritonavir to 500/125 mg tablets twice daily or 533/133 mg (6.5 mL) oral solution twice daily is recommended when used in combination with nevirapine. Neither lopinavir/ritonavir tablets nor oral solution should be administered once daily in combination with nevirapine.
Dosing in pediatric patients:
1000 "Dosing in adult patients:
A dose adjustment of lopinavir/ritonavir to 500/125 mg tablets twice daily or 533/133 mg (6.5 mL) oral solution twice daily is recommended when used in combination with nevirapine. Neither lopinavir/ritonavir tablets nor oral solution should be administered once daily in combination with nevirapine.
Dosing in pediatric patients:
Please refer to the Kaletra® prescribing information for dosing recommendations based on body surface area and body weight. Neither lopinavir/ritonavir tablets nor oral solution should be administered once daily in combination with nevirapine." b3e740ad-46d9-48f5-85ab-7c319919ceb1
1047 ? Rifabutin b3e740ad-46d9-48f5-85ab-7c319919ceb1
1080 Plasma concentrations may be decreased. b3e740ad-46d9-48f5-85ab-7c319919ceb1
993 "? Amprenavir
993 "? Amprenavir
? Nevirapine" b3e740ad-46d9-48f5-85ab-7c319919ceb1
986 Atazanavir/RitonavirThe interaction between Nevirapine and the drug was evaluated in a clinical study. All other drug interactions shown are predicted. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1087 Appropriate doses for this combinations have not been established. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1039 Appropriate doses for this combination have not been established. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1073 "Cancer chemotherapy:
1073 "Cancer chemotherapy:
Cyclophosphamide" b3e740ad-46d9-48f5-85ab-7c319919ceb1
1012 The appropriate doses of these combinations with respect to safety and efficacy have not been established. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1031 Methadone b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand All @@ -76,7 +76,7 @@
990 ? Amprenavir? Nevirapine b3e740ad-46d9-48f5-85ab-7c319919ceb1
1092 ? Ethinyl estradiol? Norethindrone b3e740ad-46d9-48f5-85ab-7c319919ceb1
982 Clinical Comment b3e740ad-46d9-48f5-85ab-7c319919ceb1
1070 "Calcium channel blockers:
1070 "Calcium channel blockers:
Diltiazem, nifedipine, verapamil" b3e740ad-46d9-48f5-85ab-7c319919ceb1
1025 Other Agents b3e740ad-46d9-48f5-85ab-7c319919ceb1
1063 Nevirapine and ketoconazole should not be administered concomitantly because decreases in ketoconazole plasma concentrations may reduce the efficacy of the drug. b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand All @@ -85,19 +85,19 @@
1081 Appropriate doses for these combinations have not been established. b3e740ad-46d9-48f5-85ab-7c319919ceb1
994 No dosing adjustments are required when nevirapine is co-administered with 700/100 mg of fosamprenavir/ritonavir twice daily. The combination of nevirapine administered with fosamprenavir/ritonavir once daily has not been studied. b3e740ad-46d9-48f5-85ab-7c319919ceb1
987 ? Atazanavir? Nevirapine b3e740ad-46d9-48f5-85ab-7c319919ceb1
1040 "Antibiotics:
1040 "Antibiotics:
Clarithromycin" b3e740ad-46d9-48f5-85ab-7c319919ceb1
1074 Plasma concentrations may be decreased. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1013 DelavirdineEtravirineRilpivirine b3e740ad-46d9-48f5-85ab-7c319919ceb1
1032 ? Methadone b3e740ad-46d9-48f5-85ab-7c319919ceb1
1067 "Antithrombotics:
1067 "Antithrombotics:
Warfarin" b3e740ad-46d9-48f5-85ab-7c319919ceb1
1022 Telaprevir b3e740ad-46d9-48f5-85ab-7c319919ceb1
1060 Because of the risk of increased exposure to nevirapine, caution should be used in concomitant administration, and patients should be monitored closely for nevirapine-associated adverse events. b3e740ad-46d9-48f5-85ab-7c319919ceb1
1005 The interaction between nevirapine and saquinavir/ritonavir has not been evaluated b3e740ad-46d9-48f5-85ab-7c319919ceb1
1052 "Anticonvulsants:
1052 "Anticonvulsants:
Carbamazepine, clonazepam, ethosuximide" b3e740ad-46d9-48f5-85ab-7c319919ceb1
1085 "Opiate agonists:
1085 "Opiate agonists:
Fentanyl" b3e740ad-46d9-48f5-85ab-7c319919ceb1
998 Lopinavir/Ritonavir b3e740ad-46d9-48f5-85ab-7c319919ceb1
1078 Appropriate doses for this combination have not been established. b3e740ad-46d9-48f5-85ab-7c319919ceb1
Expand Down
103 changes: 103 additions & 0 deletions src/Annotation/MetaMapAnnotatorMain.java
@@ -0,0 +1,103 @@
package Annotation;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.LinkedList;

import DataBase.DataBaseAnnotationSaver;
import Main.MarvinSemAnnotator;
import Main.Word;
import Main.WordMeaningOutputElement;


public class MetaMapAnnotatorMain {

public static void main(String[] args) {
// TODO Auto-generated method stub
DataBaseAnnotationSaver dbas = new DataBaseAnnotationSaver();
try {
Statement stmt = dbas.conn.createStatement();
String insertTableSQL = "SELECT * FROM Cell where idCell > 489245"; // change this to be idCell that was available before running the last TableAnnotator load. Currently 489245.
ResultSet rs = stmt.executeQuery(insertTableSQL);
MarvinSemAnnotator marvin = new MarvinSemAnnotator();
while (rs.next()) {
int idCell = rs.getInt("idCell");
String CellID = rs.getString("CellID");
String CellType = rs.getString("CellType");
int Table_idTable = rs.getInt("Table_idTable");
int RowN = rs.getInt("RowN");
int ColumnN = rs.getInt("ColumnN");
String Content = rs.getString("Content");
System.out.println("Processing cell record - \n\tidCell: " + idCell + "\n\tCellID: " + CellID + "\n\tCellType: " + CellType + "\n\tTable_idTable: " + Table_idTable + "\n\tRowN: " + RowN + "\n\tColumnN: " + ColumnN);
System.out.println("Cell content:" + Content);
if(Content==null)
{
Content = "";
}
int mathTypeIndex = Content.indexOf("MathType@");
if(mathTypeIndex>0)
{
Content = Content.substring(0, mathTypeIndex);
}
LinkedList<Word> words = null;
if(Content!=null){
Content = Content.trim();
words = marvin.annotate(Content);
if(words == null){
System.out.println("ERROR: Marvin returned NULL when annotating content (see above) - this cell will be skipped for now ");
System.out.println("ERROR: letting process rest and then initiating a new marvin metamap annotation connection....");
try {
Thread.sleep(1000); //1000 milliseconds is one second.
} catch(InterruptedException ex) {
Thread.currentThread().interrupt();
}
marvin = new MarvinSemAnnotator();
continue;
}

for(Word w:words)
{

for(WordMeaningOutputElement wm: w.wordmeanings)
{
System.out.println(wm.AgentName);
Statement stmt8 = dbas.conn.createStatement();
String insertTableSQL8 = "INSERT INTO Annotation (Content,Start,End,AnnotationID,AgentType,AgentName,AnnotationURL,EnvironmentDescription,Cell_idCell,AnnotationDescription,AnnotationSchemaVersion,DateOfAction, Location) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
PreparedStatement preparedStatement8 = dbas.conn.prepareStatement(insertTableSQL8,Statement.RETURN_GENERATED_KEYS);
preparedStatement8.setString(1,wm.appearingWord);
preparedStatement8.setInt(2,wm.startAt);
preparedStatement8.setInt(3,wm.endAt);
preparedStatement8.setString(4,wm.id);
preparedStatement8.setString(5,"Software");
preparedStatement8.setString(6,wm.AgentName);
preparedStatement8.setString(7,wm.URL);
preparedStatement8.setString(8,wm.EnvironmentDesc);
preparedStatement8.setInt(9,idCell);
preparedStatement8.setString(10,wm.Description);
preparedStatement8.setString(11,wm.AgentVersion);// Should be version
//DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
preparedStatement8.setString(12,dateFormat.format(date));
preparedStatement8.setString(13,wm.Location); // Should be location
// execute insert SQL stetement
preparedStatement8.executeUpdate();
}
}
}
}

dbas.CloseDBConnection();

} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

}
2 changes: 1 addition & 1 deletion src/DataBase/DataBaseAnnotationSaver.java
Expand Up @@ -21,7 +21,7 @@
import tablInEx.Table;

public class DataBaseAnnotationSaver {
Connection conn = null;
public Connection conn = null;
Statement stmt = null;
ResultSet rs = null;

Expand Down

0 comments on commit 29899e0

Please sign in to comment.