Skip to content

Commit

Permalink
File Area: Display warning when opening non-text files; Menu: Update …
Browse files Browse the repository at this point in the history
…File - Open Files; Settings: Add Settings - Files - Miscellaneous Settings - Display warning when opening non-text files
  • Loading branch information
BLKSerene committed Jun 20, 2024
1 parent 21cd61d commit b7f669c
Show file tree
Hide file tree
Showing 54 changed files with 1,079 additions and 642 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
### 🎉 New Features
- File Area: Add support for .lrc and .pptx files
- Measures: Add lexical density/diversity - Brunét's Index / Honoré's statistic / Lexical Density
- Settings: Add Settings - Files - Miscellaneous Settings - Display warning when opening non-text files
- Settings: Add Settings - Stop Word Lists - Stop Word List Settings - Case-sensitive
- Settings: Add Settings - Tables - Dependency Parser
- Utils: Add encoding detection - UTF-8 with BOM
Expand All @@ -37,6 +38,7 @@
- Work Area: Add Profiler - Lexical Density/Diversity - Brunét's Index / Honoré's statistic / Lexical Density

### ✨ Improvements
- File Area: Display warning when opening non-text files
- Measures: Update readability - OSMAN
- Settings: Settings - Part-of-speeach Tagging - Tagsets - Mapping Settings - Allow editing of tagset mapping of spaCy's Catalan, Danish, French, Greek (Modern), Macedonian, Norwegian (Bokmål), Portuguese, Russian, Spanish, and Ukrainian part-of-speech taggers
- Settings: Settings - Part-of-speeach Tagging - Tagsets - Mapping Settings - Allow editing of tagset mapping of Stanza's Armenian (Eastern), Armenian (Western), Basque, Buryat (Russia), Danish, French, Greek (Modern), Hebrew (Modern), Hungarian, Ligurian, Manx, Marathi, Nigerian Pidgin, Pomak, Portuguese, Russian, Sanskrit, Sindhi, Sorbian (Upper), and Telugu part-of-speech taggers
Expand Down
360 changes: 188 additions & 172 deletions doc/doc.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_wl_dialog_confirm_exit():
wl_dialog_confirm_exit = wl_main.Wl_Dialog_Confirm_Exit(main)
wl_dialog_confirm_exit.open()
wl_dialog_confirm_exit.load_settings()
wl_dialog_confirm_exit.confirm_on_exit_changed()
wl_dialog_confirm_exit.always_confirm_on_exit_changed()

def test_wl_dialog_need_help():
wl_dialog_need_help = wl_main.Wl_Dialog_Need_Help(main)
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_dialogs/test_dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
def test_wl_dialog():
wl_dialog = wl_dialogs.Wl_Dialog(main, title = 'test')
wl_dialog.open()
wl_dialog.set_fixed_height()
wl_dialog.adjust_size()
wl_dialog.move_to_center()

wl_dialog = wl_dialogs.Wl_Dialog(main, title = 'test', resizable = True)
Expand Down
8 changes: 0 additions & 8 deletions tests/tests_dialogs/test_dialogs_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,11 @@ def test_wl_dialog_progress_process_data():
def test_wl_dialog_progress_download_model():
wl_dialogs_misc.Wl_Dialog_Progress_Download_Model(main).open()

def test_wl_dialog_clr_table():
wl_dialogs_misc.Wl_Dialog_Clr_Table(main).open()

def test_wl_dialog_clr_all_tables():
wl_dialogs_misc.Wl_Dialog_Clr_All_Tables(main).open()

def test_wl_dialog_restart_required():
wl_dialogs_misc.Wl_Dialog_Restart_Required(main).open()

if __name__ == '__main__':
test_wl_dialog_progress()
test_wl_dialog_progress_process_data()
test_wl_dialog_progress_download_model()
test_wl_dialog_clr_table()
test_wl_dialog_clr_all_tables()
test_wl_dialog_restart_required()
7 changes: 6 additions & 1 deletion tests/tests_nlp/tests_spacy/test_spacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@

from tests import wl_test_init, wl_test_lang_examples
from tests.tests_nlp import test_dependency_parsing, test_lemmatization, test_pos_tagging
from wordless.wl_nlp import wl_nlp_utils, wl_sentence_tokenization, wl_texts, wl_word_tokenization
from wordless.wl_nlp import (
wl_nlp_utils,
wl_sentence_tokenization,
wl_texts,
wl_word_tokenization
)
from wordless.wl_utils import wl_conversion

main = wl_test_init.Wl_Test_Main(switch_lang_utils = 'spacy')
Expand Down
14 changes: 12 additions & 2 deletions tests/tests_nlp/tests_stanza/test_stanza.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@
# ----------------------------------------------------------------------

from tests import wl_test_init, wl_test_lang_examples
from tests.tests_nlp import test_dependency_parsing, test_lemmatization, test_pos_tagging, test_sentiment_analysis
from wordless.wl_nlp import wl_nlp_utils, wl_sentence_tokenization, wl_texts, wl_word_tokenization
from tests.tests_nlp import (
test_dependency_parsing,
test_lemmatization,
test_pos_tagging,
test_sentiment_analysis
)
from wordless.wl_nlp import (
wl_nlp_utils,
wl_sentence_tokenization,
wl_texts,
wl_word_tokenization
)
from wordless.wl_utils import wl_conversion

main = wl_test_init.Wl_Test_Main(switch_lang_utils = 'stanza')
Expand Down
16 changes: 8 additions & 8 deletions tests/tests_results/test_results_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_add_layouts_filters():
def test_get_filter_min_max():
wl_results_filter.get_filter_min_max(settings = settings, filter_name = 'test')

def test_dialog_results_filter():
def test_wl_dialog_results_filter():
dialog_results_filter = wl_results_filter.Wl_Dialog_Results_Filter(
main,
table = wl_test_init.Wl_Test_Table(main, tab = 'dependency_parser')
Expand All @@ -89,7 +89,7 @@ def test_dialog_results_filter():
dialog_results_filter.file_to_filter_changed()
dialog_results_filter.show()

def test_dialog_results_filter_dependency_parser():
def test_wl_dialog_results_filter_dependency_parser():
dialog_results_filter_dependency_parser = wl_results_filter.Wl_Dialog_Results_Filter_Dependency_Parser(
main,
table = wl_test_init.Wl_Test_Table(main, tab = 'dependency_parser')
Expand All @@ -98,7 +98,7 @@ def test_dialog_results_filter_dependency_parser():
dialog_results_filter_dependency_parser.load_settings(defaults = True)
dialog_results_filter_dependency_parser.load_settings(defaults = False)

def test_dialog_results_filter_wordlist_generator():
def test_wl_dialog_results_filter_wordlist_generator():
dialog_results_filter_wordlist_generator = wl_results_filter.Wl_Dialog_Results_Filter_Wordlist_Generator(
main,
table = wl_test_init.Wl_Test_Table(main, tab = 'wordlist_generator')
Expand All @@ -111,7 +111,7 @@ def test_dialog_results_filter_wordlist_generator():
table = wl_test_init.Wl_Test_Table(main, tab = 'ngram_generator')
)

def test_dialog_results_filter_collocation_extractor():
def test_wl_dialog_results_filter_collocation_extractor():
dialog_results_filter_collocation_extractor = wl_results_filter.Wl_Dialog_Results_Filter_Collocation_Extractor(
main,
table = wl_test_init.Wl_Test_Table(main, tab = 'collocation_extractor')
Expand All @@ -135,7 +135,7 @@ def test_dialog_results_filter_collocation_extractor():
test_add_layouts_filters()
test_get_filter_min_max()

test_dialog_results_filter()
test_dialog_results_filter_dependency_parser()
test_dialog_results_filter_wordlist_generator()
test_dialog_results_filter_collocation_extractor()
test_wl_dialog_results_filter()
test_wl_dialog_results_filter_dependency_parser()
test_wl_dialog_results_filter_wordlist_generator()
test_wl_dialog_results_filter_collocation_extractor()
4 changes: 2 additions & 2 deletions tests/tests_results/test_results_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

main = wl_test_init.Wl_Test_Main()

def test_dialog_results_search():
def test_wl_dialog_results_search():
table = wl_test_init.Wl_Test_Table(main, tab = 'dependency_parser')
table.settings['file_area']['files_open'] = [{'selected': True, 'lang': 'test'}]

Expand All @@ -48,4 +48,4 @@ def test_dialog_results_search():
dialog_results_search.clr_history()

if __name__ == '__main__':
test_dialog_results_search()
test_wl_dialog_results_search()
6 changes: 3 additions & 3 deletions tests/tests_results/test_results_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
main = wl_test_init.Wl_Test_Main()
table = wl_test_init.Wl_Test_Table(main, tab = 'concordancer')

def test_dialog_results_sort_concordancer():
def test_wl_dialog_results_sort_concordancer():
dialog_results_sort_concordancer = wl_results_sort.Wl_Dialog_Results_Sort_Concordancer(
main,
table = table
Expand All @@ -45,7 +45,7 @@ def test_dialog_results_sort_concordancer():
dialog_results_sort_concordancer.update_gui([])

def test_table_results_sort_concordancer():
table_results_sort_concordancer = wl_results_sort.Wl_Table_Results_Sort_Conordancer(
table_results_sort_concordancer = wl_results_sort.Table_Results_Sort_Conordancer(
main,
table = table
)
Expand Down Expand Up @@ -96,5 +96,5 @@ def test_table_results_sort_concordancer():
table_results_sort_concordancer.load_settings(defaults = False)

if __name__ == '__main__':
test_dialog_results_sort_concordancer()
test_wl_dialog_results_sort_concordancer()
test_table_results_sort_concordancer()
9 changes: 7 additions & 2 deletions tests/wl_test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
from PyQt5.QtCore import QObject
from PyQt5.QtGui import QStandardItemModel, QStandardItem
from PyQt5.QtWidgets import (
QApplication, QLabel, QMainWindow, QPushButton, QStatusBar,
QTableView, QTabWidget
QApplication,
QLabel,
QMainWindow,
QPushButton,
QStatusBar,
QTableView,
QTabWidget
)

from tests import wl_test_file_area
Expand Down
14 changes: 12 additions & 2 deletions wordless/wl_colligation_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@
from wordless.wl_checks import wl_checks_work_area
from wordless.wl_dialogs import wl_dialogs_misc
from wordless.wl_figs import wl_figs, wl_figs_freqs, wl_figs_stats
from wordless.wl_nlp import wl_matching, wl_nlp_utils, wl_texts, wl_token_processing
from wordless.wl_nlp import (
wl_matching,
wl_nlp_utils,
wl_texts,
wl_token_processing
)
from wordless.wl_utils import wl_misc, wl_sorting, wl_threading
from wordless.wl_widgets import wl_boxes, wl_layouts, wl_tables, wl_widgets
from wordless.wl_widgets import (
wl_boxes,
wl_layouts,
wl_tables,
wl_widgets
)

_tr = QCoreApplication.translate

Expand Down
14 changes: 12 additions & 2 deletions wordless/wl_collocation_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@
from wordless.wl_checks import wl_checks_work_area
from wordless.wl_dialogs import wl_dialogs_misc
from wordless.wl_figs import wl_figs, wl_figs_freqs, wl_figs_stats
from wordless.wl_nlp import wl_matching, wl_nlp_utils, wl_texts, wl_token_processing
from wordless.wl_nlp import (
wl_matching,
wl_nlp_utils,
wl_texts,
wl_token_processing
)
from wordless.wl_utils import wl_misc, wl_sorting, wl_threading
from wordless.wl_widgets import wl_boxes, wl_layouts, wl_tables, wl_widgets
from wordless.wl_widgets import (
wl_boxes,
wl_layouts,
wl_tables,
wl_widgets
)

_tr = QCoreApplication.translate

Expand Down
24 changes: 21 additions & 3 deletions wordless/wl_concordancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,32 @@
import matplotlib.pyplot
import numpy
from PyQt5.QtCore import pyqtSignal, QCoreApplication, Qt
from PyQt5.QtWidgets import QCheckBox, QLabel, QLineEdit, QGroupBox, QStackedWidget
from PyQt5.QtWidgets import (
QCheckBox,
QLabel,
QLineEdit,
QGroupBox,
QStackedWidget
)

from wordless.wl_checks import wl_checks_work_area
from wordless.wl_dialogs import wl_dialogs_misc
from wordless.wl_figs import wl_figs
from wordless.wl_nlp import wl_matching, wl_nlp_utils, wl_texts, wl_token_processing, wl_sentiment_analysis
from wordless.wl_nlp import (
wl_matching,
wl_nlp_utils,
wl_texts,
wl_token_processing,
wl_sentiment_analysis
)
from wordless.wl_utils import wl_misc, wl_threading
from wordless.wl_widgets import wl_boxes, wl_labels, wl_layouts, wl_tables, wl_widgets
from wordless.wl_widgets import (
wl_boxes,
wl_labels,
wl_layouts,
wl_tables,
wl_widgets
)

_tr = QCoreApplication.translate

Expand Down
14 changes: 12 additions & 2 deletions wordless/wl_concordancer_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@

from wordless.wl_checks import wl_checks_work_area
from wordless.wl_dialogs import wl_dialogs_misc, wl_msg_boxes
from wordless.wl_nlp import wl_matching, wl_nlp_utils, wl_texts, wl_token_processing
from wordless.wl_nlp import (
wl_matching,
wl_nlp_utils,
wl_texts,
wl_token_processing
)
from wordless.wl_utils import wl_misc, wl_threading
from wordless.wl_widgets import wl_labels, wl_layouts, wl_tables, wl_widgets
from wordless.wl_widgets import (
wl_labels,
wl_layouts,
wl_tables,
wl_widgets
)

_tr = QCoreApplication.translate

Expand Down
14 changes: 12 additions & 2 deletions wordless/wl_dependency_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,19 @@

from wordless.wl_checks import wl_checks_work_area
from wordless.wl_dialogs import wl_dialogs_misc
from wordless.wl_nlp import wl_dependency_parsing, wl_matching, wl_texts, wl_token_processing
from wordless.wl_nlp import (
wl_dependency_parsing,
wl_matching,
wl_texts,
wl_token_processing
)
from wordless.wl_utils import wl_misc, wl_threading
from wordless.wl_widgets import wl_labels, wl_layouts, wl_tables, wl_widgets
from wordless.wl_widgets import (
wl_labels,
wl_layouts,
wl_tables,
wl_widgets
)

_tr = QCoreApplication.translate

Expand Down
Loading

0 comments on commit b7f669c

Please sign in to comment.