Gronos02

Computational Linguistic

Nov 10th, 2021 (edited)
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.18 KB | None | 0 0
  1. #BEFORE DO ANYTHING WITH FRESHLY INSTALLED OS DO THIS:
  2. sudo apt update
  3. sudo apt upgrade
  4.  
  5.  
  6. ### 1 лаба ###
  7. sudo apt-get install python3
  8. sudo apt-get install python3-pip
  9. sudo apt-get install openjdk-8-jdk
  10. #-->one command to install all above: sudo apt-get install python3 python3-pip openjdk-8-jdk
  11.  
  12. sudo pip3 install pyspark
  13. #All example code can be downloaded from EOS2. (https://eos2.vstu.ru/mod/folder/view.php?id=185359)
  14.  
  15. ### 2 лаба ###
  16. sudo apt-get install git
  17. sudo apt-get install build-essential cmake lua5.2
  18. sudo apt-get install make m4 gcc autoconf libtool autoconf-archive pkg-config swig flex graphviz
  19. sudo apt-get install libtre-dev libhunspell-dev libedit-dev libsqlite3-dev
  20.  
  21. git clone https://github.com/yandex/tomita-parser
  22. cd tomita-parser && mkdir build && cd build
  23. sudo cmake ../src/
  24. sudo make
  25. cd bin
  26. #-->Create all needed files:
  27. #    ->config.proto
  28. #    ->dic.gzt
  29. #    ->fact_types.proto
  30. #    ->first_grammar.cxx
  31. #    ->input.txt
  32. #and move libmystem_c_binding.so to bin folder
  33. #-->All files and code can be downloaded from EOS2. (https://eos2.vstu.ru/mod/folder/view.php?id=199246)
  34.  
  35. #To launch tomita parser
  36. ./tomita-parser config.proto
  37.  
  38. #-->Dont forget to discard any changes done with linkgrammar before!
  39. git clone https://github.com/opencog/link-grammar
  40. cd link-grammar
  41. sudo ./autogen.sh
  42. sudo ./configure --enable-python-bindings
  43. export PYTHONPATH=/usr/local/lib/python3.6/site-packages
  44. sudo make
  45. sudo make check
  46. #--> Be sure that make check done without errors
  47. sudo su
  48. sudo make install
  49. sudo ldconfig
  50. su <username>
  51. sudo make installcheck
  52. #--> Make sure that done without errors
  53. export PYTHONPATH=/usr/local/lib/python3.6/site-packages/linkgrammar
  54. #--> This made python import lib works fine
  55. #    then run any of your scripts with lg.
  56.  
  57. #run program: python3 <filename>.py
  58. #OR
  59. #python
  60. #OR
  61. #python3.6 (or any other version)
  62.  
  63.  
  64. ### 3 лаба ###
  65. #Notice, this lab can be done on your windows system.
  66. pip3 install ufal.udpipe
  67. #Download model: https://yadi.sk/d/b19-KhrAjMHgmg
  68. #Exmaple code can be downloaded from EOS2. (https://eos2.vstu.ru/mod/folder/view.php?id=211719)
  69.  
  70. #optional:
  71. #--> unlock permissions:
  72. sudo chmod -R a+w <path or file>
Add Comment
Please, Sign In to add comment