PgsFile 0.5.4__py3-none-any.whl → 0.5.5__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.

Potentially problematic release.


This version of PgsFile might be problematic. Click here for more details.

PgsFile/PgsFile.py CHANGED
@@ -3800,17 +3800,16 @@ def file_to_list_of_dicts(input_path, output_path):
3800
3800
 
3801
3801
  import liwc
3802
3802
  import json
3803
- def perform_liwc_en(dic_path, file_path, output_excel_path):
3803
+ def perform_liwc_en(file_path, output_excel_path):
3804
3804
  '''
3805
3805
  Parameters
3806
3806
  ----------
3807
- dic_path : str
3808
- Path to the LIWC dictionary file.
3809
3807
  file_path : str
3810
3808
  Path to the raw text file.
3811
3809
  output_excel_path : str
3812
3810
  Path to the output Excel file.
3813
3811
  '''
3812
+ dic_path = get_library_location("PgsFile")+"/PgsFile/models/dics/LIWC2015-English.dic"
3814
3813
  parse, category_names = liwc.load_token_parser(dic_path)
3815
3814
  test = get_data_text(file_path)
3816
3815
  test_tokens = [w.lower() for w in word_tokenize2(test)]
@@ -3850,7 +3849,7 @@ def perform_liwc_en(dic_path, file_path, output_excel_path):
3850
3849
  df.to_excel(output_excel_path, 'sheet1', index=False)
3851
3850
 
3852
3851
 
3853
- def perform_liwc_zh(dic_path, file_path, output_excel_path):
3852
+ def perform_liwc_zh(file_path, output_excel_path):
3854
3853
  '''
3855
3854
  Parameters
3856
3855
  ----------
@@ -3861,6 +3860,7 @@ def perform_liwc_zh(dic_path, file_path, output_excel_path):
3861
3860
  output_excel_path : str
3862
3861
  Path to the output Excel file.
3863
3862
  '''
3863
+ dic_path = get_library_location("PgsFile")+"/PgsFile/models/dics/LIWC2015-Chinese.json"
3864
3864
 
3865
3865
  f=open(dic_path,"r")
3866
3866
  dicx=json.load(f)