pelican-nlp 0.2.4__py3-none-any.whl → 0.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pelican_nlp/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.4"
1
+ __version__ = "0.2.6"
pelican_nlp/cli.py CHANGED
@@ -7,6 +7,10 @@ def main():
7
7
  print("No .yml configuration file found in the current directory.")
8
8
  return
9
9
 
10
+ if len(config_files) > 1:
11
+ print("More than one configuration file found - remove unneeded files from project directory")
12
+ return
13
+
10
14
  config_file = config_files[0] # You could also add logic to choose or validate
11
15
  print(f"Using configuration file: {config_file}")
12
16
 
@@ -4,7 +4,6 @@
4
4
  # Basic Settings
5
5
  # -------------
6
6
  input_file: "audio" # Options: 'text' or 'audio'
7
- PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/Silvia"
8
7
  language: "dutch" # Options: 'german', 'english'
9
8
  recompute_everything: true # If false, reuses previously computed results
10
9
  output_document_information: true
@@ -5,7 +5,6 @@ discourse: &discourse_flag true
5
5
  #=====================================
6
6
 
7
7
  #general configurations; always adapt
8
- PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/Morteza/"
9
8
  language: "german" # Possibly add options for German and English
10
9
 
11
10
  task_name: "interview" # Give name of task used for creation of the input file (e.g., ['fluency', 'interview'])
@@ -5,7 +5,6 @@ fluency_task: &fluency_flag true
5
5
  #========================================
6
6
 
7
7
  #general configurations; always adapt
8
- PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/FluencyTest"
9
8
  language: "german"
10
9
  multiple_sessions: &session_flag false
11
10
 
@@ -4,7 +4,6 @@
4
4
  # Basic Settings
5
5
  # -------------
6
6
  input_file: "text" # Options: 'text' or 'audio'
7
- PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/FluencyTest"
8
7
  language: "german" # Options: 'german', 'english'
9
8
  recompute_everything: true # If false, reuses previously computed results
10
9
 
@@ -3,8 +3,6 @@
3
3
  input_file: "text" #or 'audio'
4
4
  discourse: &discourse_flag true
5
5
 
6
- #PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/KetamineStudy/KetamineStudy_ProjectFolder/" # Set default to home directory, e.g., '/home/usr/...'
7
- PATH_TO_PROJECT_FOLDER: "/home/yvespauli/PycharmProjects/Morteza/"
8
6
  language: "german" # Possibly add options for German and English
9
7
 
10
8
  task_name: "interview" # Give name of task used for creation of the input file (e.g., ['fluency', 'interview'])
@@ -21,7 +21,7 @@ class Corpus:
21
21
  self.documents = documents
22
22
  self.config = configuration_settings
23
23
  self.project_folder = project_folder
24
- self.derivative_dir = project_folder + '/derivatives'
24
+ self.derivative_dir = project_folder / 'derivatives'
25
25
  self.pipeline = TextPreprocessingPipeline(self.config)
26
26
  self.task = configuration_settings['task_name']
27
27
  self.results_path = None
pelican_nlp/main.py CHANGED
@@ -24,6 +24,8 @@ from pelican_nlp.core import Corpus
24
24
  from pelican_nlp.utils.setup_functions import subject_instantiator, load_config, remove_previous_derivative_dir
25
25
  from pelican_nlp.preprocessing import LPDS
26
26
 
27
+ project_path = '/home/yvespauli/PycharmProjects/PyPI_testing_fluency/config_fluency.yml'
28
+
27
29
  class Pelican:
28
30
 
29
31
  """Main class for the Pelican project handling document processing and metric extraction."""
@@ -31,7 +33,7 @@ class Pelican:
31
33
  def __init__(self, config_path: str = None, dev_mode: bool = True) -> None:
32
34
  self.dev_mode = dev_mode
33
35
 
34
- # If no config path is provided, use the default config from package
36
+ # If no config path is provided, use the default config from package; used for dev-mode
35
37
  if config_path is None:
36
38
  package_dir = Path(__file__).parent
37
39
  default_config = package_dir / 'configuration_files' / 'config_fluency.yml'
@@ -205,4 +207,4 @@ class Pelican:
205
207
 
206
208
 
207
209
  if __name__ == '__main__':
208
- Pelican().run()
210
+ Pelican(project_path).run()
@@ -5,7 +5,6 @@ discourse: &discourse_flag true
5
5
  #=====================================
6
6
 
7
7
  #general configurations; always adapt
8
- PATH_TO_PROJECT_FOLDER: "/path/to/your/project"
9
8
  language: "german" # Possibly add options for German and English
10
9
 
11
10
  task_name: "interview" # Give name of task used for creation of the input file (e.g., ['fluency', 'interview'])
@@ -5,7 +5,6 @@ fluency_task: &fluency_flag true
5
5
  #========================================
6
6
 
7
7
  #general configurations; always adapt
8
- PATH_TO_PROJECT_FOLDER: "/path/to/your/project"
9
8
  language: "german"
10
9
  multiple_sessions: &session_flag false
11
10
 
@@ -4,9 +4,8 @@
4
4
  # Basic Settings
5
5
  # -------------
6
6
  input_file: "text" # Options: 'text' or 'audio'
7
- PATH_TO_PROJECT_FOLDER: "/path/to/your/project"
8
7
  language: "german"
9
- recompute_everything: true # If false, reuses previously computed results
8
+ recompute_everything: true #If false will give warning if output folder already exists
10
9
 
11
10
  # Task Configuration
12
11
  # -----------------
@@ -21,7 +20,7 @@ corpus_names: # List of task corpora
21
20
  multiple_sessions: false
22
21
  number_of_subjects: null # If null, auto-detected
23
22
  number_of_speakers: 1
24
- subject_speakertag: null # Speaker tag for subject (e.g., "B")
23
+ subject_speakertag: null # Speaker tag for subject (e.g., "B"), only for discourse
25
24
 
26
25
  # Document Structure
27
26
  # ----------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pelican_nlp
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Preprocessing and Extraction of Linguistic Information for Computational Analysis
5
5
  Author-email: Yves Pauli <yves.pauli@gmail.com>
6
6
  License-Expression: CC-BY-NC-4.0
@@ -65,6 +65,18 @@ pelican_nlp stands for "Preprocessing and Extraction of Linguistic Information f
65
65
  Installation
66
66
  ============
67
67
 
68
+ Create conda environment
69
+
70
+ .. code-block:: bash
71
+
72
+ conda create -n pelican-nlp python=3.10
73
+
74
+ Activate environment
75
+
76
+ .. code-block:: bash
77
+
78
+ conda activate pelican-nlp
79
+
68
80
  Install the package using pip:
69
81
 
70
82
  .. code-block:: bash
@@ -80,12 +92,12 @@ For the latest development version:
80
92
  Usage
81
93
  =====
82
94
 
83
- To use the pelican_nlp package:
95
+ To run pelican_nlp you need a configuration.yml file in your project directory, which specifies the configurations used for your project.
96
+ Sample configuration files can be found on the pelican_nlp github repository: https://github.com/ypauli/pelican_nlp/tree/main/sample_configuration_files
84
97
 
85
- Adapt your configuration file to your needs.
86
- ALWAYS change the specified project folder location.
98
+ Adapt your configuration file to your needs and save your personal configuration.yml file to your main project directory.
87
99
 
88
- Save configuration file to main project directory.
100
+ Running pelican_nlp with your configurations can be done directly from the command line interface or via Python script.
89
101
 
90
102
  Run from command line:
91
103
 
@@ -93,13 +105,16 @@ Navigate to main project directory in command line and enter the following comma
93
105
 
94
106
  .. code-block:: bash
95
107
 
108
+ conda activate pelican-nlp
96
109
  pelican-run
97
110
 
98
111
 
99
112
  Run with python script:
100
113
 
101
114
  Create python file with IDE of your choice (e.g. Visual Studio Code, Pycharm, etc.) and copy the following code into the file:
115
+ Make sure to use the previously created conda environment 'pelican-nlp' for your project.
102
116
 
117
+ Run the following Python code:
103
118
  .. code-block:: python
104
119
 
105
120
  from pelican_nlp.main import Pelican
@@ -142,8 +157,7 @@ Features
142
157
  Examples
143
158
  ========
144
159
 
145
- You can find example setups in the [`examples/`](https://github.com/ypauli/pelican_nlp/tree/main/examples) folder.
146
- ALWAYS change the path to the project folder specified in the configuration file to your specific project location.
160
+ You can find example setups on the github repository in the 'examples` folder: https://github.com/ypauli/pelican_nlp/tree/main/examples
147
161
 
148
162
  Contributing
149
163
  ============
@@ -1,7 +1,7 @@
1
1
  pelican_nlp/__init__.py,sha256=TD5xjKeXXAH6nUWG-6igbClgovi5r8RIEqI_ix1QeYo,204
2
- pelican_nlp/_version.py,sha256=k2uKAAzDEmm1BIVWeztFlHrCh9fq64H6szFcsXW7tvs,21
3
- pelican_nlp/cli.py,sha256=uXouL67mTjBynFMWpBTaGvGtEBWDnbS1BI7aRdxV-0M,439
4
- pelican_nlp/main.py,sha256=iTaV0xuftFijsn1QLk_6iZ2AQDs-r6Z9l0sACOXFwGo,7539
2
+ pelican_nlp/_version.py,sha256=2-ouoBkTVsCtduvfXac3lGkBeSELS7N-9R2Sdu-KxL4,21
3
+ pelican_nlp/cli.py,sha256=mPz-ASIMUme69G6YGVpTnHr5VfM3XA4h29WFd7DXpa4,588
4
+ pelican_nlp/main.py,sha256=HX2Rbl4j7RXaMXlGCtggBBqcg3gRh-ey1PdLsQcDX30,7660
5
5
  pelican_nlp/Nils_backup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  pelican_nlp/Nils_backup/extract_acoustic_features.py,sha256=eSP8lXxbZ15YE1HqxGtma9uWOcSN-fI-ig-NwQ9eOA8,10771
7
7
  pelican_nlp/Nils_backup/speaker_diarization_Nils.py,sha256=3RIhjKihu4Z1rruMt9KESFE2lqesfzIpRr7rLummUEo,10219
@@ -31,14 +31,14 @@ pelican_nlp/Nils_backup/transcription/word_boundaries.py,sha256=n6erYFVgDWLkgMnS
31
31
  pelican_nlp/Nils_backup/transcription/output/holmes_control_nova_all_outputs.json,sha256=Eo2pseyXGWSRLs44fDBIAUU7d57gXFXcq4A58iuLoVo,212326
32
32
  pelican_nlp/Silvia_files/Opensmile/opensmile_feature_extraction.py,sha256=sJsthRqJI8bfH38H-OwyQdxXCBIrXEdFm3qSARamYIw,2093
33
33
  pelican_nlp/Silvia_files/prosogram/prosogram.py,sha256=ndjtTSgVzEchPEcRNb9jAHuiKRJYXI2C3Y__Deyc1rU,3324
34
- pelican_nlp/configuration_files/config_audio.yml,sha256=aUneGp32RkBQD2xxgYw7J4djWatfWEjTm7Z8UeO49ec,3868
35
- pelican_nlp/configuration_files/config_discourse.yml,sha256=WrZk5J2xWMQQPOu25BsqIOM5CrYcAhxCxoMcQVKbDIU,3661
36
- pelican_nlp/configuration_files/config_fluency.yml,sha256=nBTGJXnbj8IhWsJGwP4ZutZCeIu2ybHUepG7RAWA1y0,3060
37
- pelican_nlp/configuration_files/config_general.yml,sha256=dOBiqOhw0VgV0LZ1boYJhhjCsnTaYBk6qoCTai-fk-o,3474
38
- pelican_nlp/configuration_files/config_morteza.yml,sha256=T378fxvBY9hERVGsnXroDFCy8Zh5PIq4dyer2b5AiDY,3376
34
+ pelican_nlp/configuration_files/config_audio.yml,sha256=E9PTI9-DGj-jCMU-teRLqbbtdBOuxEqeu7p48nr0LEg,3803
35
+ pelican_nlp/configuration_files/config_discourse.yml,sha256=wUWjqiwjyBi7-pxP66h_EGPA5XVw6lbIAj71S3tdlqU,3594
36
+ pelican_nlp/configuration_files/config_fluency.yml,sha256=JYpq90K4AF5TslzESJK6Nidw6-D1IiqD_6cdmlCd5-w,2990
37
+ pelican_nlp/configuration_files/config_general.yml,sha256=Dx06lK77yHSiH5U8vxrfm5U5Xc0O6rft6i6PuwcqNuU,3404
38
+ pelican_nlp/configuration_files/config_morteza.yml,sha256=ZUcEIHrXWH9H3r42kTWIFEfgtqZBpyYUMOErVC7X3z8,3152
39
39
  pelican_nlp/core/__init__.py,sha256=whJc5dWsGsKn2IAw-D4BvCvUKW1sVtWYE1WJIuUr5uI,165
40
40
  pelican_nlp/core/audio_document.py,sha256=hhSJNgeqSYa6_uws2ho66agHhAdHuKN3EIEdIsIcXKg,586
41
- pelican_nlp/core/corpus.py,sha256=j_p4hWwLnHuGu4jQakG9oVeizDD9mvWVWVJKTu_lMB4,15143
41
+ pelican_nlp/core/corpus.py,sha256=EIt-3giRaFe0vcJoKla_J8uVF_zR6oGmbQnNbllO9C0,15142
42
42
  pelican_nlp/core/document.py,sha256=j2HP5FX6cfmXHo7OWVFCX6cMsDyqsOmNlnGNNNfCm2c,8467
43
43
  pelican_nlp/core/subject.py,sha256=-pi3jDzb2zLiG8JNAi9i-9Jd-VtsPxDO4ShQci2QSMg,1059
44
44
  pelican_nlp/extraction/__init__.py,sha256=hfqFiaKpQBS6cwRm9Yd7MpOcV60_xJmwuQ2Kegary5k,84
@@ -62,16 +62,16 @@ pelican_nlp/preprocessing/text_cleaner.py,sha256=QKqxwoRR8dnuBYiY-PXK1kB7744TVUc
62
62
  pelican_nlp/preprocessing/text_importer.py,sha256=FtSyJjFXDxVle7Jpyw6EqCLDbLTCRxqVQi9ymWWtPB4,1356
63
63
  pelican_nlp/preprocessing/text_normalizer.py,sha256=huo5VFqJ0p2jq-ud1047XvMu1qNeaiuG879SF3zkJoM,894
64
64
  pelican_nlp/preprocessing/text_tokenizer.py,sha256=h875bXr0YuMrLh4HtQUvpHmASScddtkQXGaF9mm7uwU,1642
65
- pelican_nlp/sample_configuration_files/config_discourse.yml,sha256=xVHIUpSORV6iR0nEvuess6rfiAvuGEkqmaMWD_6kyFE,3618
66
- pelican_nlp/sample_configuration_files/config_fluency.yml,sha256=oQ6Y2BhRLExEMpS3VRH2pFrGHi788L66aSYUm05nV_A,3038
67
- pelican_nlp/sample_configuration_files/config_general.yml,sha256=UuGnZUa-SVmioE9NmXWOMKuv3uG5mNjIuXgA6-Y0JS0,3440
65
+ pelican_nlp/sample_configuration_files/config_discourse.yml,sha256=OaTCoMwhDjrOIBpw1nKXWIoSWRUUFNjGQdgQZHVrJn0,3570
66
+ pelican_nlp/sample_configuration_files/config_fluency.yml,sha256=JYpq90K4AF5TslzESJK6Nidw6-D1IiqD_6cdmlCd5-w,2990
67
+ pelican_nlp/sample_configuration_files/config_general.yml,sha256=-GAVATlqXuQq4ANSW0JauwIGhr7ET_oZiBiM7I40AkA,3424
68
68
  pelican_nlp/utils/__init__.py,sha256=q1tGdOOj5UPRC2mGhoMUh8p4cbFCkkbD21bQaOVvFao,189
69
69
  pelican_nlp/utils/csv_functions.py,sha256=hsG73gm3Up9sAerp6gIxuNHaeP1vJj6HSh7ggVm1SSo,7272
70
70
  pelican_nlp/utils/sample_usage.py,sha256=W__OVMjWND-ZtxxRhfGJDHwbVpGlB-anXDxyA5P4cME,353
71
71
  pelican_nlp/utils/setup_functions.py,sha256=t4WG5qd5iYpNNBGklje_8ukwmJp_C9RMLLi7veDgNeA,3574
72
- pelican_nlp-0.2.4.dist-info/licenses/LICENSE,sha256=m3jshBZIXKiBX6qhmhtJcLTVJ1N6BEkQGIflneXvpYg,19336
73
- pelican_nlp-0.2.4.dist-info/METADATA,sha256=tiN6ZrLCIm6zJOlE-6YQjyzuFVyjAJBLYpmnd7ytX8A,5562
74
- pelican_nlp-0.2.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
75
- pelican_nlp-0.2.4.dist-info/entry_points.txt,sha256=znlG0paAfju9P10UM3rm5HcCHoj4tarTllNpeaqH_gc,53
76
- pelican_nlp-0.2.4.dist-info/top_level.txt,sha256=F0qlyqy5FCd3sTS_npUYPeLKN9_BZq6wD4qo9pI0xbg,12
77
- pelican_nlp-0.2.4.dist-info/RECORD,,
72
+ pelican_nlp-0.2.6.dist-info/licenses/LICENSE,sha256=m3jshBZIXKiBX6qhmhtJcLTVJ1N6BEkQGIflneXvpYg,19336
73
+ pelican_nlp-0.2.6.dist-info/METADATA,sha256=DYwHgLjafHAMgzDy0ADYPm_FBvLdRxW98jBAxTH70vU,6140
74
+ pelican_nlp-0.2.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
75
+ pelican_nlp-0.2.6.dist-info/entry_points.txt,sha256=znlG0paAfju9P10UM3rm5HcCHoj4tarTllNpeaqH_gc,53
76
+ pelican_nlp-0.2.6.dist-info/top_level.txt,sha256=F0qlyqy5FCd3sTS_npUYPeLKN9_BZq6wD4qo9pI0xbg,12
77
+ pelican_nlp-0.2.6.dist-info/RECORD,,