From af6a1eb1cba68a9775c99b31456c0df7929c46f9 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 16:55:58 -0400 Subject: [PATCH 01/11] changed docs/source/getting_started.rst, brew install openjdk --- docs/source/getting_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 2f166a09..5d8125ca 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -58,7 +58,7 @@ Mac ``` #. Ensure Java 11 is installed inside Anaconda distribution (``conda install -c anaconda openjdk``) if using Anaconda, or - via Homebrew otherwise (``brew cask install java``) + via Homebrew otherwise (``brew install openjdk``) #. Check Java version is 11 via ``java --version`` #. Once PolyglotDB is installed, run :code:`pgdb install /path/to/where/you/want/data/to/be/stored`, or :code:`pgdb install` to save data in the default directory. From bf10089e2b5c2dad5faf8117be525acd0644e2d8 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 17:21:44 -0400 Subject: [PATCH 02/11] add docs/source/tshoot_install.rst, pgdb setup on Mac --- docs/source/tshoot_install.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/source/tshoot_install.rst diff --git a/docs/source/tshoot_install.rst b/docs/source/tshoot_install.rst new file mode 100644 index 00000000..a47e6fe0 --- /dev/null +++ b/docs/source/tshoot_install.rst @@ -0,0 +1,12 @@ +************ +Installation (for Mac users) +************ + +If the ``pgdb`` command does not work, you may try the following steps: + +1. Uninstall Java +2. Make sure Anaconda is installed on your Mac. If you are using Miniconda, run ``miniconda install anaconda`` to install Anaconda. +3. Reinstall Java by ``conda install -anaconda openjdk``. Note that you should not use Homebrew to install Java, since Anaconda helps to manage the Java version appropriate for PolyGlot installation. +4. ``pgdb install``, ``pgdb start``, and ``pgdb stop`` should work now. + + From 756120d000429ad6bf370e7d64658ff9cdd61186 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 17:32:19 -0400 Subject: [PATCH 03/11] added troubleshooting.rst --- docs/source/troubleshoot.rst | 17 +++++++++++++++++ docs/source/tshoot_install.rst | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 docs/source/troubleshoot.rst diff --git a/docs/source/troubleshoot.rst b/docs/source/troubleshoot.rst new file mode 100644 index 00000000..dec54d35 --- /dev/null +++ b/docs/source/troubleshoot.rst @@ -0,0 +1,17 @@ +.. _troubleshooting: + +*************** +Troubleshooting +*************** + +This section contains several troubleshooting tips on installation, tutorials, etc. + + +Contents: + +.. toctree:: + :maxdepth: 2 + + tshoot_install.rst + + diff --git a/docs/source/tshoot_install.rst b/docs/source/tshoot_install.rst index a47e6fe0..079a9412 100644 --- a/docs/source/tshoot_install.rst +++ b/docs/source/tshoot_install.rst @@ -1,3 +1,5 @@ +.. _tshoot_install: + ************ Installation (for Mac users) ************ From 477bacd76671de092419865b66d5b115d54f8cf0 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 17:34:17 -0400 Subject: [PATCH 04/11] changed docs/source/index.rst --- docs/source/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/index.rst b/docs/source/index.rst index bb6c2818..d7e6ba09 100755 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,6 +18,7 @@ Contents: queries.rst developer.rst changelog.rst + troubleshooting.rst See `the PolyglotDB wiki`_ for the changelog. From a04c86d00dd5aea37f48dd89313bb324c2ec8741 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 17:39:06 -0400 Subject: [PATCH 05/11] modified index.rst --- docs/source/{troubleshoot.rst => troubleshooting.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/source/{troubleshoot.rst => troubleshooting.rst} (100%) diff --git a/docs/source/troubleshoot.rst b/docs/source/troubleshooting.rst similarity index 100% rename from docs/source/troubleshoot.rst rename to docs/source/troubleshooting.rst From 6d1426e8a9354d9882e4f7b80d54a1c4c88a0fa9 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 17:46:00 -0400 Subject: [PATCH 06/11] modified index.rst --- docs/source/troubleshooting.rst | 6 +++--- docs/source/tshoot_install.rst | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index dec54d35..252a6f51 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -9,9 +9,9 @@ This section contains several troubleshooting tips on installation, tutorials, e Contents: -.. toctree:: - :maxdepth: 2 +.. toctree:: + :maxdepth: 2 - tshoot_install.rst + tshoot_install.rst diff --git a/docs/source/tshoot_install.rst b/docs/source/tshoot_install.rst index 079a9412..f1130fad 100644 --- a/docs/source/tshoot_install.rst +++ b/docs/source/tshoot_install.rst @@ -1,9 +1,12 @@ .. _tshoot_install: ************ -Installation (for Mac users) +Installation ************ +For Mac users +============= + If the ``pgdb`` command does not work, you may try the following steps: 1. Uninstall Java From 44bc40b8f4564ed53774874abb846415516b9729 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 19:28:58 -0400 Subject: [PATCH 07/11] add tshoot_other.rst and tshoot_tut.rst --- docs/source/troubleshooting.rst | 3 +-- docs/source/tshoot_install.rst | 2 +- docs/source/tshoot_other.rst | 32 +++++++++++++++++++++++++++ docs/source/tshoot_tut.rst | 39 +++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 docs/source/tshoot_other.rst create mode 100644 docs/source/tshoot_tut.rst diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index 252a6f51..cc131493 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -1,7 +1,7 @@ .. _troubleshooting: *************** -Troubleshooting +Troubleshooting Tips *************** This section contains several troubleshooting tips on installation, tutorials, etc. @@ -14,4 +14,3 @@ Contents: tshoot_install.rst - diff --git a/docs/source/tshoot_install.rst b/docs/source/tshoot_install.rst index f1130fad..24c70fc6 100644 --- a/docs/source/tshoot_install.rst +++ b/docs/source/tshoot_install.rst @@ -4,7 +4,7 @@ Installation ************ -For Mac users +On Mac ============= If the ``pgdb`` command does not work, you may try the following steps: diff --git a/docs/source/tshoot_other.rst b/docs/source/tshoot_other.rst new file mode 100644 index 00000000..1169d8b9 --- /dev/null +++ b/docs/source/tshoot_other.rst @@ -0,0 +1,32 @@ +.. _tshoot_other: + +************ +Others +************ + +Run time error +=============== + +If this error occurs: + +.. code:: + RuntimeError: + An attempt has been made to start a new process before the + current process has finished its bootstrapping phase. + + This probably means that you are not using fork to start your + child processes and you have forgotten to use the proper idiom + in the main module: + + if __name__ == '__main__': + freeze_support() + ... + + The "freeze_support()" line can be omitted if the program + is not going to be frozen to produce an executable. + + +You need to add ``if __name__ == '__main__'`` at the beginning of your vowel-formant.py file. + + + diff --git a/docs/source/tshoot_tut.rst b/docs/source/tshoot_tut.rst new file mode 100644 index 00000000..aa0789b1 --- /dev/null +++ b/docs/source/tshoot_tut.rst @@ -0,0 +1,39 @@ +.. _tshoot_tut: + +************ +Tutorials +************ + +Corpus Structure +=============== + +* Your corpus should be arranged by speaker. +* Each speaker directory contains TextGrid files and the corresponding wav files. If some corresponding wav files are missing, the ``KeyError: 'vowel_file_path'`` may appear. +* If the KeyError still exists, you may reset the corpus as below. + +.. code-block:: + with CorpusContext(corpus_name) as c: + c.reset() + + +Defining Vowel Set (Tutorial 4) +=============== + +**In vowel formant analysis, make sure to check the output of the phone set, and accordingly define your own vowel set.** This is because, in Tutorial 4, the regex used to define the vowel set may not work for the language you are working on. + +In other words, instead of using: + +.. code-block:: + vowel_set = [re.search(vowel_regex, p).string for p in phone_set + if re.search(vowel_regex, p) != None and p not in non_speech_set] + + +Use (e.g., for Cantonese): + +.. code-block:: + vowel_set = ['6', '6j', '6w', '9', '9y', 'E:', 'O:', 'O:j', 'a:', 'a:j', 'a:w', 'ej', 'i:', 'ow', 'u:', 'y:'] + + +You can either use your own regex or type the vowels manually based the output of the phone set. + + From 180b33aa44eec857c107aa12bc1fd8ad103814f9 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 19:31:03 -0400 Subject: [PATCH 08/11] change troubleshooting.rst --- docs/source/troubleshooting.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/troubleshooting.rst b/docs/source/troubleshooting.rst index cc131493..2a8a32c5 100644 --- a/docs/source/troubleshooting.rst +++ b/docs/source/troubleshooting.rst @@ -13,4 +13,7 @@ Contents: :maxdepth: 2 tshoot_install.rst + tshoot_tut.rst + tshoot_other.rst + From fa4a2e19b6c1ce4e7d8e08d157ba93356814bba3 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 19:35:09 -0400 Subject: [PATCH 09/11] edit code block --- docs/source/tshoot_other.rst | 2 +- docs/source/tshoot_tut.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/tshoot_other.rst b/docs/source/tshoot_other.rst index 1169d8b9..a2ce236c 100644 --- a/docs/source/tshoot_other.rst +++ b/docs/source/tshoot_other.rst @@ -9,7 +9,7 @@ Run time error If this error occurs: -.. code:: +.. code-block:: python RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. diff --git a/docs/source/tshoot_tut.rst b/docs/source/tshoot_tut.rst index aa0789b1..4f57aa1e 100644 --- a/docs/source/tshoot_tut.rst +++ b/docs/source/tshoot_tut.rst @@ -11,7 +11,7 @@ Corpus Structure * Each speaker directory contains TextGrid files and the corresponding wav files. If some corresponding wav files are missing, the ``KeyError: 'vowel_file_path'`` may appear. * If the KeyError still exists, you may reset the corpus as below. -.. code-block:: +.. code-block:: python with CorpusContext(corpus_name) as c: c.reset() @@ -23,14 +23,14 @@ Defining Vowel Set (Tutorial 4) In other words, instead of using: -.. code-block:: +.. code-block:: python vowel_set = [re.search(vowel_regex, p).string for p in phone_set if re.search(vowel_regex, p) != None and p not in non_speech_set] Use (e.g., for Cantonese): -.. code-block:: +.. code-block:: python vowel_set = ['6', '6j', '6w', '9', '9y', 'E:', 'O:', 'O:j', 'a:', 'a:j', 'a:w', 'ej', 'i:', 'ow', 'u:', 'y:'] From 2e9f848b432475cf4a9074d5d80b0a7a63cbd56c Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 19:37:14 -0400 Subject: [PATCH 10/11] edit code block again --- docs/source/tshoot_other.rst | 1 + docs/source/tshoot_tut.rst | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/source/tshoot_other.rst b/docs/source/tshoot_other.rst index a2ce236c..44e77eed 100644 --- a/docs/source/tshoot_other.rst +++ b/docs/source/tshoot_other.rst @@ -10,6 +10,7 @@ Run time error If this error occurs: .. code-block:: python + RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. diff --git a/docs/source/tshoot_tut.rst b/docs/source/tshoot_tut.rst index 4f57aa1e..9d7bc20f 100644 --- a/docs/source/tshoot_tut.rst +++ b/docs/source/tshoot_tut.rst @@ -12,6 +12,7 @@ Corpus Structure * If the KeyError still exists, you may reset the corpus as below. .. code-block:: python + with CorpusContext(corpus_name) as c: c.reset() @@ -24,6 +25,7 @@ Defining Vowel Set (Tutorial 4) In other words, instead of using: .. code-block:: python + vowel_set = [re.search(vowel_regex, p).string for p in phone_set if re.search(vowel_regex, p) != None and p not in non_speech_set] @@ -31,6 +33,7 @@ In other words, instead of using: Use (e.g., for Cantonese): .. code-block:: python + vowel_set = ['6', '6j', '6w', '9', '9y', 'E:', 'O:', 'O:j', 'a:', 'a:j', 'a:w', 'ej', 'i:', 'ow', 'u:', 'y:'] From a3d2df631b6cc1fb0d5084aad51d710ecb608972 Mon Sep 17 00:00:00 2001 From: Jessie Date: Tue, 9 Aug 2022 19:53:48 -0400 Subject: [PATCH 11/11] update rtd_requirements.txt, sphinx_rtd_theme>=0.3.1 --- rtd_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtd_requirements.txt b/rtd_requirements.txt index 7d202d79..599f0e86 100755 --- a/rtd_requirements.txt +++ b/rtd_requirements.txt @@ -1,4 +1,4 @@ sphinx numpydoc mock -sphinx_rtd_theme +sphinx_rtd_theme>=0.3.1