aait 2.2.2.2__tar.gz → 2.2.2.3__tar.gz
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.
- {aait-2.2.2.2 → aait-2.2.2.3}/PKG-INFO +7 -2
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/PKG-INFO +7 -2
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/SOURCES.txt +6 -1
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/answers.py +1 -1
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/process_documents.py +58 -5
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/MetManagement.py +13 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/windows_utils.py +158 -114
- aait-2.2.2.3/orangecontrib/AAIT/widgets/OWAccumulator.py +162 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWEditTable.py +2 -2
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWEmptySwitch.py +0 -1
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWFileMetadata.py +32 -33
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWFileSyncChecker.py +9 -9
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWFileWithPath.py +5 -6
- aait-2.2.2.3/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +335 -0
- aait-2.2.2.3/orangecontrib/AAIT/widgets/OWFusionNM.py +410 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWGenerateQuestions.py +1 -1
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWKeywordsDetection.py +5 -1
- aait-2.2.2.3/orangecontrib/AAIT/widgets/OWLoadDocuments.py +125 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWQueryLLM.py +3 -3
- aait-2.2.2.3/orangecontrib/AAIT/widgets/designer/owaccumulator.ui +83 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owextrachunks.ui +14 -1
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owfindfilesfromdir.ui +77 -6
- aait-2.2.2.3/orangecontrib/AAIT/widgets/designer/owloaddocuments.ui +86 -0
- aait-2.2.2.3/orangecontrib/AAIT/widgets/icons/owaccumulatator.png +0 -0
- aait-2.2.2.3/orangecontrib/AAIT/widgets/icons/owloaddocuments.svg +52 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/setup.py +1 -1
- aait-2.2.2.2/orangecontrib/AAIT/widgets/OWFindFilesFromDir.py +0 -161
- aait-2.2.2.2/orangecontrib/AAIT/widgets/OWFusionNM.py +0 -450
- {aait-2.2.2.2 → aait-2.2.2.3}/License.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/dependency_links.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/entry_points.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/namespace_packages.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/requires.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/aait.egg-info/top_level.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/SignalReceiver.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/audit_widget.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (2).TIF +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (3).TIF +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/00079473A - Copie (4).TIF +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0001.csv +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0002.csv +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dataTests/Tir 81mm_0003.csv +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/dynamic_results.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/test_all_widgets.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/test_server.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_4all.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_chunking.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_edit_table.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_mpnet_create_embeddings.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_optimisation.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_optimisationselection.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_powfactory.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_queryllm.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_spacy_md_fr_lemmatizer.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widget_traduction.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/audit_widget/widgets_model.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/encapsulation/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/fix_torch/fix_torch_dll_error.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/fix_torch/libomp140.x86_64.dll +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/MergeBaseLora.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/SERV_kill_workflow.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/SERV_requests.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/SERV_start_workflow.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/Tutorial_Finetuning.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/Tutorial_TestFinetuning.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/chunking.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/embeddings.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/finetuning.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/functions_DatasetGeneration.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/functions_Finetuning.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/lemmes.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/lmstudio.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/main_DatasetGeneration.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/main_Finetuning.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/prompt_management.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/quickpy.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/test.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/test_functions.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/llm/translations.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/optimiser/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/optimiser/optuna_multi.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/CheckMetaData.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/SimpleDialogQt.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/aait_repo_file.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/check_data_in.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/delta_local_shared_fodler.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/import_uic.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/initialize_from_ini.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/mac_utils.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/shared_functions.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/shared_variables.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/subprocess_management.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/thread_management.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/tools/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/tools/change_owcorpus.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/tools/first_time_check.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/utils/tools/owcorpus_ok.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWAAITResourcesManager.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWAddColumns.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWApplyRules.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWCN2rule_view.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWChunking.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWConcatRules.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWConverseLLM.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWCreateEmbeddings.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWDisplayMD.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWEndLoop.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWExecuteScript.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWExtraChunks.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWExtractTokens.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWGenerateSynthesis.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWGenerateWord.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWInputSelector.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWKeywords.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWLMStudio.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWLanguageDetection.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWLemmatizer.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Falcon.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_HelsinkiFrEn.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_MPNET.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Mistral.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen1B5_Q6.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen2_5_32B.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen3B_Q4.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q4.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Qwen7B_Q6.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_Solar.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_SolarUncensored.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_EN.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWModel_SpacyMD_FR.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWOptimisation.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWOptimisationSelection.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWOptimisationSendScore.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWProcessDocumentsFromPath.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWRandomData.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWReranking.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWSaveFilepathEntry.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWSelectColumnDynamique.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWSelectRowsDynamic.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWStartLoop.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWTable2Corpus.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWTranslation.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWTrigger.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/OWUnzipFolder.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/POW_Wfactory.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owMarkdown.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owaddcolumns.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owapplyrules.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owchunking.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owconcatrules.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owconversellm.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owembeddings.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owemptyswitch.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owendloop.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owexecutescript.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owextracttokens.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owfilemetadata.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owfilesyncchecker.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owfilewithpath.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owfusion_nm.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owgenerate_word.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owgeneratequestions.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owgeneratesynthesis.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owkeyword.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owlangdetect.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owlemmatizer.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owloadworkflow.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_en_fr.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_helsinki_fr_en.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_mistral.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_mpnet.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_2.5_32b.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_1.5b_q6.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_3b_q4.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q4.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwen_instruct_7b_q6.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_qwencoder_7b.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_solar.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_solar_uncensored.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_en.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owmodel_spacymd_fr.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/ownumberpointinrules.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owprocessdocuments.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owqueryllm.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owreranking.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owsavewithpath.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owselect_column_dynamic.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owselect_row_dynamic.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owstartloop.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owtable2corpus.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owtranslation.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owtrigger.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/designer/owunzipfolder.ui +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/CN2RuleViewer.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/MDViewer.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/Mistral.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/apply_rules.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/category.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/dark_green.txt +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/de.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/document_generator.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/documents.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/endloop.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/extra_chunks.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/in_or_out.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/input.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/languages.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/lm_studio.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/local_interf_img_multi_pull.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/local_interf_multi_pull.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/local_interf_pull.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/local_interf_push.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/local_interf_text_pull.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/logo_solar.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/logo_uncensoredsolar.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/logo_upload.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/models.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/optimisation.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/optimizer.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/output.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owchunking.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owconversellm.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owedittable.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owembeddings.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owemptyswitch.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owenvinfo.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owexecutescript.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owextracttokens.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owfilemetadata.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owfilesfromdir.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owfilesyncchecker.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owfilewithpath.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owfusion_nm.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owgeneratequestions.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owkeywords.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owlemmatizer.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_falcon.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_helsinki_fr_en.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_mpnet.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_en.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owmodel_spacymd_fr.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owoptimisation.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owoptimisationselection.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owqueryllm.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owreranking.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owsavefilepathentry.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owselectcolumndynamique.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owtable2corpus.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owtranslation.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/owtrigger.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/processdocuments.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/qwen-color.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/select_dynamic_row.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/startloop.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/tools.png +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/widgetFactory.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/AAIT/widgets/icons/zip.svg +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/orangecontrib/__init__.py +0 -0
- {aait-2.2.2.2 → aait-2.2.2.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aait
|
|
3
|
-
Version: 2.2.2.
|
|
3
|
+
Version: 2.2.2.3
|
|
4
4
|
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Orange community
|
|
@@ -26,3 +26,8 @@ Requires-Dist: psutil
|
|
|
26
26
|
Requires-Dist: thefuzz==0.22.1
|
|
27
27
|
Requires-Dist: beautifulsoup4==4.12.3
|
|
28
28
|
Requires-Dist: CATEGORIT
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: keywords
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: summary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aait
|
|
3
|
-
Version: 2.2.2.
|
|
3
|
+
Version: 2.2.2.3
|
|
4
4
|
Summary: Advanced Artificial Intelligence Tools is a package meant to develop and enable advanced AI functionalities in Orange
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: Orange community
|
|
@@ -26,3 +26,8 @@ Requires-Dist: psutil
|
|
|
26
26
|
Requires-Dist: thefuzz==0.22.1
|
|
27
27
|
Requires-Dist: beautifulsoup4==4.12.3
|
|
28
28
|
Requires-Dist: CATEGORIT
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: keywords
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: summary
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
License.txt
|
|
2
|
-
setup.cfg
|
|
3
2
|
setup.py
|
|
4
3
|
aait.egg-info/PKG-INFO
|
|
5
4
|
aait.egg-info/SOURCES.txt
|
|
@@ -82,6 +81,7 @@ orangecontrib/AAIT/utils/tools/concat_splitted_pypi.py
|
|
|
82
81
|
orangecontrib/AAIT/utils/tools/first_time_check.py
|
|
83
82
|
orangecontrib/AAIT/utils/tools/owcorpus_ok.txt
|
|
84
83
|
orangecontrib/AAIT/widgets/OWAAITResourcesManager.py
|
|
84
|
+
orangecontrib/AAIT/widgets/OWAccumulator.py
|
|
85
85
|
orangecontrib/AAIT/widgets/OWAddColumns.py
|
|
86
86
|
orangecontrib/AAIT/widgets/OWApplyRules.py
|
|
87
87
|
orangecontrib/AAIT/widgets/OWCN2rule_view.py
|
|
@@ -110,6 +110,7 @@ orangecontrib/AAIT/widgets/OWKeywordsDetection.py
|
|
|
110
110
|
orangecontrib/AAIT/widgets/OWLMStudio.py
|
|
111
111
|
orangecontrib/AAIT/widgets/OWLanguageDetection.py
|
|
112
112
|
orangecontrib/AAIT/widgets/OWLemmatizer.py
|
|
113
|
+
orangecontrib/AAIT/widgets/OWLoadDocuments.py
|
|
113
114
|
orangecontrib/AAIT/widgets/OWModel_CE_MiniLML6.py
|
|
114
115
|
orangecontrib/AAIT/widgets/OWModel_Falcon.py
|
|
115
116
|
orangecontrib/AAIT/widgets/OWModel_HelsinkiEnFr.py
|
|
@@ -146,6 +147,7 @@ orangecontrib/AAIT/widgets/__init__.py
|
|
|
146
147
|
orangecontrib/AAIT/widgets/designer/owMarkdown.ui
|
|
147
148
|
orangecontrib/AAIT/widgets/designer/ow_in_or_out_path.ui
|
|
148
149
|
orangecontrib/AAIT/widgets/designer/ow_widget_random_data.ui
|
|
150
|
+
orangecontrib/AAIT/widgets/designer/owaccumulator.ui
|
|
149
151
|
orangecontrib/AAIT/widgets/designer/owaddcolumns.ui
|
|
150
152
|
orangecontrib/AAIT/widgets/designer/owapplyrules.ui
|
|
151
153
|
orangecontrib/AAIT/widgets/designer/owchunking.ui
|
|
@@ -169,6 +171,7 @@ orangecontrib/AAIT/widgets/designer/owkeyword.ui
|
|
|
169
171
|
orangecontrib/AAIT/widgets/designer/owkeywordsdetection.ui
|
|
170
172
|
orangecontrib/AAIT/widgets/designer/owlangdetect.ui
|
|
171
173
|
orangecontrib/AAIT/widgets/designer/owlemmatizer.ui
|
|
174
|
+
orangecontrib/AAIT/widgets/designer/owloaddocuments.ui
|
|
172
175
|
orangecontrib/AAIT/widgets/designer/owloadworkflow.ui
|
|
173
176
|
orangecontrib/AAIT/widgets/designer/owmodel_ce_minilml6.ui
|
|
174
177
|
orangecontrib/AAIT/widgets/designer/owmodel_falcon.ui
|
|
@@ -227,6 +230,7 @@ orangecontrib/AAIT/widgets/icons/optimisation.png
|
|
|
227
230
|
orangecontrib/AAIT/widgets/icons/optimizer.png
|
|
228
231
|
orangecontrib/AAIT/widgets/icons/output.png
|
|
229
232
|
orangecontrib/AAIT/widgets/icons/owCN2_intersect_rules.svg
|
|
233
|
+
orangecontrib/AAIT/widgets/icons/owaccumulatator.png
|
|
230
234
|
orangecontrib/AAIT/widgets/icons/owchunking.png
|
|
231
235
|
orangecontrib/AAIT/widgets/icons/owconversellm.svg
|
|
232
236
|
orangecontrib/AAIT/widgets/icons/owedittable.svg
|
|
@@ -245,6 +249,7 @@ orangecontrib/AAIT/widgets/icons/owgeneratesynthesis.png
|
|
|
245
249
|
orangecontrib/AAIT/widgets/icons/owkeywords.png
|
|
246
250
|
orangecontrib/AAIT/widgets/icons/owkeywordsdetection.png
|
|
247
251
|
orangecontrib/AAIT/widgets/icons/owlemmatizer.svg
|
|
252
|
+
orangecontrib/AAIT/widgets/icons/owloaddocuments.svg
|
|
248
253
|
orangecontrib/AAIT/widgets/icons/owmodel_ce_minilml6.svg
|
|
249
254
|
orangecontrib/AAIT/widgets/icons/owmodel_falcon.png
|
|
250
255
|
orangecontrib/AAIT/widgets/icons/owmodel_helsinki_en_fr.svg
|
|
@@ -224,7 +224,7 @@ def write_tokens_to_file(token: str, workflow_id=""):
|
|
|
224
224
|
f.flush()
|
|
225
225
|
|
|
226
226
|
|
|
227
|
-
def run_query(prompt, model, max_tokens=4096, temperature=0
|
|
227
|
+
def run_query(prompt, model, max_tokens=4096, temperature=0, top_p=0, top_k=40, repeat_penalty=1.15,
|
|
228
228
|
workflow_id="", argself=None, progress_callback=None):
|
|
229
229
|
"""
|
|
230
230
|
Generates a response from a local LLM model using the given prompt, with support for streaming output
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import json
|
|
3
3
|
import ntpath
|
|
4
|
+
from pathlib import Path
|
|
4
5
|
|
|
5
6
|
from Orange.data import Table, Domain, StringVariable
|
|
6
7
|
|
|
@@ -133,6 +134,49 @@ def check_for_embeddings(folder_path):
|
|
|
133
134
|
return None
|
|
134
135
|
|
|
135
136
|
|
|
137
|
+
def load_documents_in_table(table, progress_callback=None, argself=None):
|
|
138
|
+
"""
|
|
139
|
+
Load the text content of each document listed in a table and add it
|
|
140
|
+
as a new column "content".
|
|
141
|
+
|
|
142
|
+
:param table: Orange.data.Table containing file paths in a column named "path".
|
|
143
|
+
:return: Orange.data.Table with an added meta column "content" containing the extracted text.
|
|
144
|
+
"""
|
|
145
|
+
# Make a copy of the table to avoid modifying the original
|
|
146
|
+
data = table.copy()
|
|
147
|
+
|
|
148
|
+
# List to store text from each document
|
|
149
|
+
texts = []
|
|
150
|
+
names = []
|
|
151
|
+
# Iterate over all rows in the table
|
|
152
|
+
for i, row in enumerate(data):
|
|
153
|
+
# Get file path from the "path" column
|
|
154
|
+
filepath = row["path"].value
|
|
155
|
+
# Get text and name
|
|
156
|
+
name = Path(filepath).name
|
|
157
|
+
text = extract_text(filepath)
|
|
158
|
+
# Store results
|
|
159
|
+
names.append(name)
|
|
160
|
+
texts.append(text)
|
|
161
|
+
# Update progress if a callback is provided
|
|
162
|
+
if progress_callback is not None:
|
|
163
|
+
progress_value = float(100 * (i + 1) / len(data))
|
|
164
|
+
progress_callback(progress_value)
|
|
165
|
+
# Check if processing should be stopped
|
|
166
|
+
if argself is not None and getattr(argself, "stop", False):
|
|
167
|
+
break
|
|
168
|
+
|
|
169
|
+
# Create a StringVariable for the new column
|
|
170
|
+
var_content = StringVariable("content")
|
|
171
|
+
var_name = StringVariable("name")
|
|
172
|
+
|
|
173
|
+
# Add the column as a meta-column in the table
|
|
174
|
+
data = data.add_column(variable=var_name, data=names, to_metas=True)
|
|
175
|
+
data = data.add_column(variable=var_content, data=texts, to_metas=True)
|
|
176
|
+
return data
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
136
180
|
def extract_text(filepath):
|
|
137
181
|
"""
|
|
138
182
|
Extrait le texte d'un fichier en fonction de son type (PDF ou DOCX).
|
|
@@ -148,11 +192,13 @@ def extract_text(filepath):
|
|
|
148
192
|
return extract_text_from_pdf(filepath)
|
|
149
193
|
elif file_extension == ".docx":
|
|
150
194
|
return extract_text_from_docx(filepath)
|
|
195
|
+
elif file_extension in [".txt", ".md"]:
|
|
196
|
+
return extract_text_from_txt(filepath)
|
|
151
197
|
else:
|
|
152
|
-
|
|
198
|
+
return "ERROR: Unsupported file format. Please use a .pdf, .docx, .txt, or .md file."
|
|
153
199
|
except Exception as e:
|
|
154
200
|
print(f"Erreur lors de l'extraction de texte depuis {filepath}: {e}")
|
|
155
|
-
return "Extraction Error"
|
|
201
|
+
return f"ERROR: Extraction Error ({e})"
|
|
156
202
|
|
|
157
203
|
|
|
158
204
|
def extract_text_from_pdf(pdf_path):
|
|
@@ -176,7 +222,7 @@ def extract_text_from_pdf(pdf_path):
|
|
|
176
222
|
return extracted_text
|
|
177
223
|
except Exception as e:
|
|
178
224
|
print(f"Erreur lors de l'extraction de texte depuis {pdf_path}: {e}")
|
|
179
|
-
return "Extraction Error"
|
|
225
|
+
return f"ERROR: Extraction Error ({e})"
|
|
180
226
|
|
|
181
227
|
|
|
182
228
|
def extract_text_from_docx(docx_path):
|
|
@@ -221,13 +267,20 @@ def extract_text_from_docx(docx_path):
|
|
|
221
267
|
row_text = [cell.text.strip() for cell in row.cells] # Extrait le texte de chaque cellule
|
|
222
268
|
table_text.append("\t".join(row_text)) # Sépare les colonnes par des tabulations
|
|
223
269
|
extracted_text.append("\n".join(table_text)) # Ajoute le tableau sous forme de texte
|
|
224
|
-
|
|
225
270
|
return "\n".join(filter(None, extracted_text)) # Retourne le texte en filtrant les vides
|
|
226
271
|
|
|
227
272
|
except Exception as e:
|
|
228
273
|
print(f"Erreur lors de l'extraction de texte depuis {docx_path}: {e}")
|
|
229
|
-
return "Extraction Error"
|
|
274
|
+
return f"ERROR: Extraction Error ({e})"
|
|
275
|
+
|
|
230
276
|
|
|
277
|
+
def extract_text_from_txt(filepath):
|
|
278
|
+
try:
|
|
279
|
+
with open(filepath, 'r', encoding='utf-8') as f:
|
|
280
|
+
return f.read()
|
|
281
|
+
except Exception as e:
|
|
282
|
+
print(f"Erreur lors de l'extraction de texte depuis {filepath}: {e}")
|
|
283
|
+
return f"ERROR: Extraction Error ({e})"
|
|
231
284
|
|
|
232
285
|
|
|
233
286
|
def get_pages_of_extract(pdf_path, extract):
|
|
@@ -1368,6 +1368,19 @@ def write_file_time(path):
|
|
|
1368
1368
|
except Exception as e:
|
|
1369
1369
|
print(f"Error creating .ok file: {e}")
|
|
1370
1370
|
return
|
|
1371
|
+
def write_file_arbitrary_time(path,time):
|
|
1372
|
+
time= int(time)
|
|
1373
|
+
time_ok=path[:-4]+".ok"
|
|
1374
|
+
reset_files([time_ok])
|
|
1375
|
+
with open(path, "w") as f:
|
|
1376
|
+
f.write(str(time))
|
|
1377
|
+
f.flush()
|
|
1378
|
+
try:
|
|
1379
|
+
with open(time_ok, "w"):
|
|
1380
|
+
pass
|
|
1381
|
+
except Exception as e:
|
|
1382
|
+
print(f"Error creating .ok file: {e}")
|
|
1383
|
+
return
|
|
1371
1384
|
|
|
1372
1385
|
def read_file_time(path):
|
|
1373
1386
|
time_ok = path[:-4] + ".ok"
|
|
@@ -13,6 +13,9 @@ if os.name=='nt':
|
|
|
13
13
|
from win32com.shell import shell, shellcon
|
|
14
14
|
import ctypes
|
|
15
15
|
import ctypes.wintypes
|
|
16
|
+
import sys
|
|
17
|
+
from ctypes import windll, c_wchar_p
|
|
18
|
+
|
|
16
19
|
def win32_shellcopy(src, dest):
|
|
17
20
|
"""
|
|
18
21
|
Copy files and directories using Windows shell.
|
|
@@ -336,121 +339,162 @@ if os.name=='nt':
|
|
|
336
339
|
|
|
337
340
|
|
|
338
341
|
|
|
339
|
-
def select_new_file_ctypes(file_filter="All Files (*.*)", dialog_title="Create New File"):
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
# Ouvre la boîte de dialogue
|
|
420
|
-
if not comdlg32.GetSaveFileNameW(ctypes.byref(ofn)):
|
|
421
|
-
return ""
|
|
422
|
-
|
|
423
|
-
time.sleep(0.1)
|
|
424
|
-
|
|
425
|
-
# Fenêtres après
|
|
426
|
-
hwnd_list_after = []
|
|
427
|
-
EnumWindows(EnumWindowsProc(lambda hwnd, lParam: hwnd_list_after.append(hwnd) or True), 0)
|
|
428
|
-
new_hwnds = list(set(hwnd_list_after) - set(hwnd_list_before))
|
|
429
|
-
|
|
430
|
-
selector_hwnd = None
|
|
431
|
-
target_phrase = (dialog_title or "Save").lower()
|
|
432
|
-
for hwnd in new_hwnds:
|
|
433
|
-
length = user32.GetWindowTextLengthW(hwnd)
|
|
434
|
-
if length > 0:
|
|
435
|
-
window_title = ctypes.create_unicode_buffer(length + 1)
|
|
436
|
-
user32.GetWindowTextW(hwnd, window_title, length + 1)
|
|
437
|
-
if target_phrase in window_title.value.lower():
|
|
438
|
-
selector_hwnd = hwnd
|
|
439
|
-
break
|
|
440
|
-
|
|
441
|
-
def enforce_modal(hwnd):
|
|
442
|
-
if not hwnd:
|
|
443
|
-
return
|
|
444
|
-
while user32.IsWindow(hwnd):
|
|
445
|
-
user32.SetForegroundWindow(hwnd)
|
|
446
|
-
user32.SetWindowPos(hwnd, -1, 0, 0, 0, 0,
|
|
447
|
-
0x0002 | 0x0001 | 0x0040) # SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW
|
|
448
|
-
time.sleep(0.2)
|
|
342
|
+
def select_new_file_ctypes(file_filter="All Files (*.*)", dialog_title="Create New File"):
|
|
343
|
+
"""
|
|
344
|
+
Opens a native Windows file dialog for creating a new file.
|
|
345
|
+
|
|
346
|
+
Args:
|
|
347
|
+
file_filter (str): File type filters, e.g., "Text Files (*.txt)" or "All Files (*.*)".
|
|
348
|
+
|
|
349
|
+
Returns:
|
|
350
|
+
str: Selected file path as a string, or an empty string if cancelled.
|
|
351
|
+
"""
|
|
352
|
+
OFN_EXPLORER = 0x00080000
|
|
353
|
+
MAX_PATH = 65536 # Large buffer for filename
|
|
354
|
+
|
|
355
|
+
class OPENFILENAME(ctypes.Structure):
|
|
356
|
+
_fields_ = [
|
|
357
|
+
("lStructSize", ctypes.wintypes.DWORD),
|
|
358
|
+
("hwndOwner", ctypes.wintypes.HWND),
|
|
359
|
+
("hInstance", ctypes.wintypes.HINSTANCE),
|
|
360
|
+
("lpstrFilter", ctypes.c_wchar_p),
|
|
361
|
+
("lpstrCustomFilter", ctypes.c_wchar_p),
|
|
362
|
+
("nMaxCustFilter", ctypes.wintypes.DWORD),
|
|
363
|
+
("nFilterIndex", ctypes.wintypes.DWORD),
|
|
364
|
+
("lpstrFile", ctypes.c_wchar_p),
|
|
365
|
+
("nMaxFile", ctypes.wintypes.DWORD),
|
|
366
|
+
("lpstrFileTitle", ctypes.c_wchar_p),
|
|
367
|
+
("nMaxFileTitle", ctypes.wintypes.DWORD),
|
|
368
|
+
("lpstrInitialDir", ctypes.c_wchar_p),
|
|
369
|
+
("lpstrTitle", ctypes.c_wchar_p),
|
|
370
|
+
("Flags", ctypes.wintypes.DWORD),
|
|
371
|
+
("nFileOffset", ctypes.wintypes.WORD),
|
|
372
|
+
("nFileExtension", ctypes.wintypes.WORD),
|
|
373
|
+
("lpstrDefExt", ctypes.c_wchar_p),
|
|
374
|
+
("lCustData", ctypes.wintypes.LPARAM),
|
|
375
|
+
("lpfnHook", ctypes.c_void_p),
|
|
376
|
+
("lpTemplateName", ctypes.c_wchar_p),
|
|
377
|
+
("pvReserved", ctypes.c_void_p),
|
|
378
|
+
("dwReserved", ctypes.wintypes.DWORD),
|
|
379
|
+
("FlagsEx", ctypes.wintypes.DWORD),
|
|
380
|
+
]
|
|
381
|
+
|
|
382
|
+
user32 = ctypes.windll.user32
|
|
383
|
+
comdlg32 = ctypes.windll.comdlg32
|
|
384
|
+
|
|
385
|
+
# Convert file_filter into Windows format: "Description\0Pattern\0..."
|
|
386
|
+
if "(" in file_filter and ")" in file_filter:
|
|
387
|
+
description = file_filter.split("(")[0].strip()
|
|
388
|
+
pattern = file_filter[file_filter.find("(")+1:file_filter.find(")")]
|
|
389
|
+
else:
|
|
390
|
+
description = "All Files"
|
|
391
|
+
pattern = "*.*"
|
|
392
|
+
|
|
393
|
+
# Extract first extension for default
|
|
394
|
+
first_ext = pattern.split(";")[0].strip().lstrip("*.")
|
|
395
|
+
if not first_ext:
|
|
396
|
+
first_ext = "txt"
|
|
397
|
+
|
|
398
|
+
filter_combined = f"{description}\0{pattern}\0All Files\0*.*\0\0"
|
|
399
|
+
|
|
400
|
+
file_buffer = ctypes.create_unicode_buffer(MAX_PATH)
|
|
401
|
+
|
|
402
|
+
ofn = OPENFILENAME()
|
|
403
|
+
ofn.lStructSize = ctypes.sizeof(OPENFILENAME)
|
|
404
|
+
ofn.hwndOwner = 0
|
|
405
|
+
ofn.lpstrFilter = filter_combined
|
|
406
|
+
ofn.lpstrFile = ctypes.cast(file_buffer, ctypes.c_wchar_p)
|
|
407
|
+
ofn.nMaxFile = MAX_PATH
|
|
408
|
+
ofn.lpstrTitle = dialog_title
|
|
409
|
+
ofn.Flags = OFN_EXPLORER
|
|
410
|
+
ofn.lpstrDefExt = first_ext # <- extension ajoutée automatiquement si absente
|
|
411
|
+
|
|
412
|
+
# Mémoriser les fenêtres existantes
|
|
413
|
+
hwnd_list_before = []
|
|
414
|
+
def enum_windows_proc(hwnd, lParam):
|
|
415
|
+
hwnd_list_before.append(hwnd)
|
|
416
|
+
return True
|
|
417
|
+
|
|
418
|
+
EnumWindows = user32.EnumWindows
|
|
419
|
+
EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.wintypes.BOOL, ctypes.wintypes.HWND, ctypes.wintypes.LPARAM)
|
|
420
|
+
EnumWindows(EnumWindowsProc(enum_windows_proc), 0)
|
|
449
421
|
|
|
450
|
-
|
|
451
|
-
|
|
422
|
+
# Ouvre la boîte de dialogue
|
|
423
|
+
if not comdlg32.GetSaveFileNameW(ctypes.byref(ofn)):
|
|
424
|
+
return ""
|
|
425
|
+
|
|
426
|
+
time.sleep(0.1)
|
|
427
|
+
|
|
428
|
+
# Fenêtres après
|
|
429
|
+
hwnd_list_after = []
|
|
430
|
+
EnumWindows(EnumWindowsProc(lambda hwnd, lParam: hwnd_list_after.append(hwnd) or True), 0)
|
|
431
|
+
new_hwnds = list(set(hwnd_list_after) - set(hwnd_list_before))
|
|
432
|
+
|
|
433
|
+
selector_hwnd = None
|
|
434
|
+
target_phrase = (dialog_title or "Save").lower()
|
|
435
|
+
for hwnd in new_hwnds:
|
|
436
|
+
length = user32.GetWindowTextLengthW(hwnd)
|
|
437
|
+
if length > 0:
|
|
438
|
+
window_title = ctypes.create_unicode_buffer(length + 1)
|
|
439
|
+
user32.GetWindowTextW(hwnd, window_title, length + 1)
|
|
440
|
+
if target_phrase in window_title.value.lower():
|
|
441
|
+
selector_hwnd = hwnd
|
|
442
|
+
break
|
|
443
|
+
|
|
444
|
+
def enforce_modal(hwnd):
|
|
445
|
+
if not hwnd:
|
|
446
|
+
return
|
|
447
|
+
while user32.IsWindow(hwnd):
|
|
448
|
+
user32.SetForegroundWindow(hwnd)
|
|
449
|
+
user32.SetWindowPos(hwnd, -1, 0, 0, 0, 0,
|
|
450
|
+
0x0002 | 0x0001 | 0x0040) # SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW
|
|
451
|
+
time.sleep(0.2)
|
|
452
|
+
|
|
453
|
+
if selector_hwnd:
|
|
454
|
+
threading.Thread(target=enforce_modal, args=(selector_hwnd,), daemon=True).start()
|
|
455
|
+
|
|
456
|
+
result = ctypes.wstring_at(ctypes.addressof(file_buffer), file_buffer._length_)
|
|
457
|
+
return result.split('\0', 1)[0].replace("\\", "/")
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
def BoxMessage(text: str, mode: int = 0, title: str = None) -> int:
|
|
461
|
+
"""
|
|
462
|
+
Affiche une boîte native Windows (via ctypes).
|
|
463
|
+
mode = 0 -> Error
|
|
464
|
+
mode = 1 -> Warning
|
|
465
|
+
mode = 2 -> Info
|
|
466
|
+
Retourne l'ID du bouton cliqué (IDOK = 1).
|
|
467
|
+
usage BoxMessage("Ceci est une erreur", 0)
|
|
468
|
+
BoxMessage("Ceci est un avertissement", 1)
|
|
469
|
+
BoxMessage("Ceci est une information", 2)
|
|
470
|
+
BoxMessage("Ceci est une erreur", 0,"titr1")
|
|
471
|
+
BoxMessage("Ceci est un avertissement", 1,"titr2")
|
|
472
|
+
BoxMessage("Ceci est une information", 2,"titr3")
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
"""
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
# Flags boutons
|
|
479
|
+
MB_OK = 0x00000000
|
|
480
|
+
MB_SYSTEMMODAL = 0x00001000
|
|
481
|
+
MB_SETFOREGROUND = 0x00010000
|
|
482
|
+
MB_TOPMOST = 0x00040000
|
|
483
|
+
|
|
484
|
+
# Icônes selon mode
|
|
485
|
+
if mode == 0: # Error
|
|
486
|
+
icon_flag = 0x00000010 # MB_ICONERROR
|
|
487
|
+
if title is None: title = "Error"
|
|
488
|
+
elif mode == 1: # Warning
|
|
489
|
+
icon_flag = 0x00000030 # MB_ICONWARNING
|
|
490
|
+
if title is None: title = "Warning"
|
|
491
|
+
elif mode == 2: # Info
|
|
492
|
+
icon_flag = 0x00000040 # MB_ICONINFORMATION
|
|
493
|
+
if title is None: title = "Information"
|
|
494
|
+
else:
|
|
495
|
+
raise ValueError("mode doit être 0=Error, 1=Warning, 2=Info")
|
|
452
496
|
|
|
453
|
-
|
|
454
|
-
return result.split('\0', 1)[0].replace("\\", "/")
|
|
497
|
+
flags = MB_OK | icon_flag | MB_SYSTEMMODAL | MB_SETFOREGROUND | MB_TOPMOST
|
|
455
498
|
|
|
499
|
+
return windll.user32.MessageBoxW(0, c_wchar_p(text), c_wchar_p(title), flags)
|
|
456
500
|
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import Orange.data
|
|
2
|
+
from Orange.data import Table, Domain, Variable
|
|
3
|
+
from orangewidget.widget import OWBaseWidget, Input, Output
|
|
4
|
+
from orangewidget.utils.widgetpreview import WidgetPreview
|
|
5
|
+
from orangewidget import gui
|
|
6
|
+
import sys
|
|
7
|
+
# Les imports suivants ne sont pas utilisés dans le corps du widget Orange,
|
|
8
|
+
# mais je les laisse car ils étaient dans votre base de code.
|
|
9
|
+
import os
|
|
10
|
+
import docx
|
|
11
|
+
import pandas as pd
|
|
12
|
+
import re
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
from AnyQt.QtWidgets import QApplication
|
|
16
|
+
from Orange.widgets import widget
|
|
17
|
+
from Orange.widgets.utils.signals import Input, Output
|
|
18
|
+
from Orange.data import Domain, StringVariable, Table, DiscreteVariable
|
|
19
|
+
|
|
20
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
21
|
+
from Orange.widgets.orangecontrib.AAIT.utils.import_uic import uic
|
|
22
|
+
from Orange.widgets.orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
23
|
+
else:
|
|
24
|
+
from orangecontrib.AAIT.utils.import_uic import uic
|
|
25
|
+
from orangecontrib.AAIT.utils.initialize_from_ini import apply_modification_from_python_file
|
|
26
|
+
|
|
27
|
+
@apply_modification_from_python_file(filepath_original_widget=__file__)
|
|
28
|
+
class OWAccumulator(OWBaseWidget):
|
|
29
|
+
name = "Data Accumulator (Flexible Columns)"
|
|
30
|
+
description = "Allows for data accumulation by concatenation, automatically merging non-matching columns."
|
|
31
|
+
priority = 10
|
|
32
|
+
category = "AAIT - TOOLBOX"
|
|
33
|
+
icon = "icons/owaccumulator.png"
|
|
34
|
+
if "site-packages/Orange/widgets" in os.path.dirname(os.path.abspath(__file__)).replace("\\", "/"):
|
|
35
|
+
icon = "icons_dev/owaccumulator.png"
|
|
36
|
+
|
|
37
|
+
# Le chemin du fichier .ui
|
|
38
|
+
gui = os.path.join(os.path.dirname(os.path.abspath(__file__)), "designer/owaccumulator.ui")
|
|
39
|
+
priority = 1094
|
|
40
|
+
|
|
41
|
+
want_main_area = True
|
|
42
|
+
# want_control_area est mis à False pour utiliser l'UI chargée dans mainArea
|
|
43
|
+
want_control_area = False
|
|
44
|
+
|
|
45
|
+
class Inputs:
|
|
46
|
+
data = Input("Input Data", Table, auto_summary=False)
|
|
47
|
+
|
|
48
|
+
class Outputs:
|
|
49
|
+
sample = Output("Output", Table, auto_summary=False)
|
|
50
|
+
preview = Output("Preview", Table, auto_summary=False)
|
|
51
|
+
|
|
52
|
+
def __init__(self):
|
|
53
|
+
super().__init__()
|
|
54
|
+
|
|
55
|
+
# --- NOUVEAU : Chargement de l'UI et connexion du bouton ---
|
|
56
|
+
# Charge le contenu du .ui dans l'instance du widget (self)
|
|
57
|
+
uic.loadUi(self.gui, self)
|
|
58
|
+
|
|
59
|
+
# Connexion du bouton 'pushButton_send' défini dans le .ui
|
|
60
|
+
try:
|
|
61
|
+
# Assurez-vous que votre bouton dans Qt Designer s'appelle 'pushButton_send'
|
|
62
|
+
self.pushButton_send.clicked.connect(self.push)
|
|
63
|
+
except AttributeError:
|
|
64
|
+
# Fallback en cas d'échec de la connexion du bouton UI
|
|
65
|
+
print("Error: Could not connect 'pushButton_send'. Using fallback GUI button.")
|
|
66
|
+
box = gui.widgetBox(self.mainArea, orientation="vertical")
|
|
67
|
+
gui.button(box, self, label="Send Accumulated Data and Purge (Fallback)", callback=self.push)
|
|
68
|
+
|
|
69
|
+
# --- Variables d'état ---
|
|
70
|
+
self.data = None
|
|
71
|
+
self.out_data = None
|
|
72
|
+
|
|
73
|
+
# --- Appel à post_initialized pour l'alignement ---
|
|
74
|
+
self.post_initialized()
|
|
75
|
+
|
|
76
|
+
def push(self):
|
|
77
|
+
"""Sends the accumulated data and resets the accumulator."""
|
|
78
|
+
if self.data is not None:
|
|
79
|
+
self.out_data = self.data.copy()
|
|
80
|
+
|
|
81
|
+
# Send the final output
|
|
82
|
+
self.Outputs.sample.send(self.out_data)
|
|
83
|
+
|
|
84
|
+
# Purge the accumulator
|
|
85
|
+
self.data = None
|
|
86
|
+
self.Outputs.preview.send(None) # Clear preview after purge
|
|
87
|
+
self.information("Data sent and accumulator purged.")
|
|
88
|
+
else:
|
|
89
|
+
self.Outputs.sample.send(None)
|
|
90
|
+
self.warning("Accumulator is empty, nothing to send.")
|
|
91
|
+
|
|
92
|
+
@Inputs.data
|
|
93
|
+
def set_data(self, dataset):
|
|
94
|
+
"""Accumulates incoming data, merging columns if necessary, with robust variable handling."""
|
|
95
|
+
self.error("") # Clear previous errors
|
|
96
|
+
if dataset is None:
|
|
97
|
+
# If input is cleared, clear the preview output
|
|
98
|
+
if self.data is not None:
|
|
99
|
+
self.data = None
|
|
100
|
+
self.Outputs.preview.send(None)
|
|
101
|
+
return
|
|
102
|
+
|
|
103
|
+
# --- LOGIQUE DE FUSION DES COLONNES (CONSERVÉE) ---
|
|
104
|
+
|
|
105
|
+
if self.data is None:
|
|
106
|
+
# First data block: initialize the accumulator
|
|
107
|
+
self.data = dataset.copy()
|
|
108
|
+
|
|
109
|
+
else:
|
|
110
|
+
try:
|
|
111
|
+
# 1. Collecter TOUTES les variables (attributs réguliers + méta) des deux tables
|
|
112
|
+
current_all_vars = self.data.domain.variables + self.data.domain.metas
|
|
113
|
+
new_all_vars = dataset.domain.variables + dataset.domain.metas
|
|
114
|
+
|
|
115
|
+
# Utiliser un dictionnaire pour ne conserver qu'une seule variable par nom
|
|
116
|
+
unique_vars = {}
|
|
117
|
+
for var in current_all_vars + new_all_vars:
|
|
118
|
+
if var.name not in unique_vars:
|
|
119
|
+
unique_vars[var.name] = var
|
|
120
|
+
|
|
121
|
+
# 2. Identifier les noms d'attributs réguliers et de méta-attributs uniques
|
|
122
|
+
current_regular_names = set(v.name for v in self.data.domain.variables)
|
|
123
|
+
new_regular_names = set(v.name for v in dataset.domain.variables)
|
|
124
|
+
current_metas_names = set(v.name for v in self.data.domain.metas)
|
|
125
|
+
new_metas_names = set(v.name for v in dataset.domain.metas)
|
|
126
|
+
|
|
127
|
+
all_vars_names = current_regular_names | new_regular_names
|
|
128
|
+
all_metas_names = current_metas_names | new_metas_names
|
|
129
|
+
|
|
130
|
+
# 3. Filtrer les variables uniques pour créer le nouveau domaine
|
|
131
|
+
all_vars = sorted([unique_vars[name] for name in all_vars_names if name not in all_metas_names],
|
|
132
|
+
key=lambda x: x.name)
|
|
133
|
+
all_metas = sorted([unique_vars[name] for name in all_metas_names], key=lambda x: x.name)
|
|
134
|
+
|
|
135
|
+
# 4. Créer le nouveau domaine
|
|
136
|
+
new_domain = Domain(all_vars, metas=all_metas)
|
|
137
|
+
|
|
138
|
+
# 5. Transform (expand) both tables to the new, common domain
|
|
139
|
+
data_expanded = self.data.transform(new_domain)
|
|
140
|
+
dataset_expanded = dataset.transform(new_domain)
|
|
141
|
+
|
|
142
|
+
# 6. Concatenate the rows of the two uniformly expanded tables
|
|
143
|
+
self.data = data_expanded.__class__.concatenate((data_expanded, dataset_expanded))
|
|
144
|
+
|
|
145
|
+
except Exception as e:
|
|
146
|
+
self.error(f"Data tables could not be aggregated/concatenated. Error: {e}")
|
|
147
|
+
return
|
|
148
|
+
# Send the current accumulated data for preview
|
|
149
|
+
self.Outputs.preview.send(self.data)
|
|
150
|
+
|
|
151
|
+
def post_initialized(self):
|
|
152
|
+
"""
|
|
153
|
+
Method for post-initialization tasks, aligned with OWChunker structure.
|
|
154
|
+
"""
|
|
155
|
+
pass
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
if __name__ == "__main__":
|
|
159
|
+
app = QApplication(sys.argv)
|
|
160
|
+
my_widget = OWAccumulatator()
|
|
161
|
+
my_widget.show()
|
|
162
|
+
app.exec()
|