Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Some lines I can't understand #85

Open
KinvenW opened this issue Apr 20, 2020 · 3 comments
Open

Some lines I can't understand #85

KinvenW opened this issue Apr 20, 2020 · 3 comments

Comments

@KinvenW
Copy link

KinvenW commented Apr 20, 2020

Hi, I have some confusion about the lines (127-133) in feature_extractor.py , I can't understand why 'good_grammar_ratio' should calculated like that. As I see it, good_grammar_ratio should be calculated as good_grammar_ratio = len(overlap_ngrams)/len(pos_ngrams), could you explain your calculation for me?

if (len(pos_ngrams)-len(overlap_ngrams))>0:
      divisor=len(pos_ngrams)/len(pos_seq)
 else:
      ivisor=1
if divisor == 0:
      divisor=1
good_grammar_ratio = (len(pos_ngrams)-len(overlap_ngrams))/divisor
@Ming-360
Copy link

hello, execuse me ,i can't find the main function of this code,can you tell me in which file the main function is ,thank you !

@KinvenW
Copy link
Author

KinvenW commented Nov 22, 2020

@Ming-360 The description of the usage is in the docs folder

@Ming-360
Copy link

@hongtao-wu thank you for your reply , i have read the usage in the docs folder , but i can't get the useful information to get-start ,and i have looked through the code but couldn't find the entrance to run the code, could you tell me how you have run the code? can i contact with you by qq or wechat ? it's my wechat - +8615271929117 ,thank you !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants