In: |
text |
text to check |
|
stop_list |
list of words used to determine the language |
|
flag |
0: stop_list is a list, text is a string |
|
|
1: stop_list is a file name, text is a string |
|
|
2: stop_list is a list, text is a file name |
|
|
3: stop_list is a file name, text is a file name |
Out: |
|
float value between 0 and 1 showing the degree the text is in the given language. The higher the value, the higher the degree. If either the stop_list, or the text file cannot be accessed the value 0 is returned. |