[+] Get paths from pkg_resources

This commit is contained in:
Azalea (on HyDEV-Daisy)
2022-04-14 20:26:41 -04:00
parent 20ce2711e2
commit 6abfef2c92
+9
View File
@@ -1,6 +1,9 @@
from __future__ import annotations
from typing import NamedTuple, Iterable
import pkg_resources
__version__ = '1.0.0'
@@ -15,3 +18,9 @@ class SentiResult(NamedTuple):
def is_positive(self) -> bool:
return self.scale() > 0
def _paths() -> tuple[str, str]:
jar = pkg_resources.resource_filename(__name__, 'original/SentiStrength.jar')
data = pkg_resources.resource_filename(__name__, 'original/data') + '/'
return jar, data