You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
1.6 KiB

4 years ago
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "from GenitivSolve import *\n",
  10. "\n",
  11. "from oi import *\n",
  12. "\n",
  13. "oi = oi()\n"
  14. ]
  15. },
  16. {
  17. "cell_type": "code",
  18. "execution_count": 2,
  19. "metadata": {},
  20. "outputs": [],
  21. "source": [
  22. "gs = GenitivSolve()"
  23. ]
  24. },
  25. {
  26. "cell_type": "code",
  27. "execution_count": 4,
  28. "metadata": {},
  29. "outputs": [],
  30. "source": [
  31. "sentences, punctuations = oi.ReadDoc2Sent('atest1')"
  32. ]
  33. },
  34. {
  35. "cell_type": "code",
  36. "execution_count": 5,
  37. "metadata": {},
  38. "outputs": [],
  39. "source": [
  40. "outsentences = gs.ReplaceGenitivWithDativ(sentences)\n"
  41. ]
  42. },
  43. {
  44. "cell_type": "code",
  45. "execution_count": 6,
  46. "metadata": {
  47. "scrolled": true
  48. },
  49. "outputs": [
  50. {
  51. "data": {
  52. "text/plain": [
  53. "'OK'"
  54. ]
  55. },
  56. "execution_count": 6,
  57. "metadata": {},
  58. "output_type": "execute_result"
  59. }
  60. ],
  61. "source": [
  62. "oi.PrintSplitSentencesToTextFile(punctuations, outsentences, 'test1out')"
  63. ]
  64. },
  65. {
  66. "cell_type": "code",
  67. "execution_count": null,
  68. "metadata": {},
  69. "outputs": [],
  70. "source": []
  71. }
  72. ],
  73. "metadata": {
  74. "kernelspec": {
  75. "display_name": "Python 3",
  76. "language": "python",
  77. "name": "python3"
  78. },
  79. "language_info": {
  80. "codemirror_mode": {
  81. "name": "ipython",
  82. "version": 3
  83. },
  84. "file_extension": ".py",
  85. "mimetype": "text/x-python",
  86. "name": "python",
  87. "nbconvert_exporter": "python",
  88. "pygments_lexer": "ipython3",
  89. "version": "3.5.3"
  90. }
  91. },
  92. "nbformat": 4,
  93. "nbformat_minor": 2
  94. }