|
1 | 1 | import inspect |
2 | 2 |
|
| 3 | +import nltk.data |
| 4 | +from importlib.util import find_spec |
| 5 | + |
3 | 6 | import featuretools |
4 | 7 | import pkg_resources |
5 | 8 | from featuretools.primitives import AggregationPrimitive, TransformPrimitive |
6 | 9 |
|
7 | | -from premium_primitives.country_code_to_continent import ( # noqa: F401 |
| 10 | +from premium_primitives.diversity_score import DiversityScore |
| 11 | +from premium_primitives.lsa import LSA |
| 12 | +from premium_primitives.mean_characters_per_sentence import MeanCharactersPerSentence |
| 13 | +from premium_primitives.number_of_sentences import NumberOfSentences |
| 14 | +from premium_primitives.part_of_speech_count import PartOfSpeechCount |
| 15 | +from premium_primitives.polarity_score import PolarityScore |
| 16 | +from premium_primitives.stopword_count import StopwordCount |
| 17 | + |
| 18 | +from premium_primitives.country_code_to_continent import ( |
8 | 19 | CountryCodeToContinent, |
9 | 20 | ) |
10 | | -from premium_primitives.country_code_to_income import CountryCodeToIncome # noqa: F401 |
11 | | -from premium_primitives.country_code_to_population import ( # noqa: F401 |
| 21 | +from premium_primitives.country_code_to_income import CountryCodeToIncome |
| 22 | +from premium_primitives.country_code_to_population import ( |
12 | 23 | CountryCodeToPopulation, |
13 | 24 | ) |
14 | | -from premium_primitives.latlong_to_city import LatLongToCity # noqa: F401 |
15 | | -from premium_primitives.latlong_to_countrycode import LatLongToCountryCode # noqa: F401 |
16 | | -from premium_primitives.latlong_to_county import LatLongToCounty # noqa: F401 |
17 | | -from premium_primitives.latlong_to_state import LatLongToState # noqa: F401 |
18 | | -from premium_primitives.phone_number_to_area import PhoneNumberToArea # noqa: F401 |
19 | | -from premium_primitives.phone_number_to_country import ( # noqa: F401 |
| 25 | +from premium_primitives.latlong_to_city import LatLongToCity |
| 26 | +from premium_primitives.latlong_to_countrycode import LatLongToCountryCode |
| 27 | +from premium_primitives.latlong_to_county import LatLongToCounty |
| 28 | +from premium_primitives.latlong_to_state import LatLongToState |
| 29 | +from premium_primitives.phone_number_to_area import PhoneNumberToArea |
| 30 | +from premium_primitives.phone_number_to_country import ( |
20 | 31 | PhoneNumberToCountry, |
21 | 32 | ) |
22 | | -from premium_primitives.postalcode_to_latlong import PostalCodeToLatLong # noqa: F401 |
23 | | -from premium_primitives.postalcode_to_per_capita_income import ( # noqa: F401 |
| 33 | +from premium_primitives.postalcode_to_latlong import PostalCodeToLatLong |
| 34 | +from premium_primitives.postalcode_to_per_capita_income import ( |
24 | 35 | PostalCodeToPerCapitaIncome, |
25 | 36 | ) |
26 | | -from premium_primitives.postalcode_to_state import PostalCodeToState # noqa: F401 |
27 | | -from premium_primitives.sub_region_code_to_median_household_income import ( # noqa: F401 |
| 37 | +from premium_primitives.postalcode_to_state import PostalCodeToState |
| 38 | +from premium_primitives.sub_region_code_to_median_household_income import ( |
28 | 39 | SubRegionCodeToMedianHouseholdIncome, |
29 | 40 | ) |
30 | | -from premium_primitives.sub_region_code_to_per_capita_income import ( # noqa: F401 |
| 41 | +from premium_primitives.sub_region_code_to_per_capita_income import ( |
31 | 42 | SubRegionCodeToPerCapitaIncome, |
32 | 43 | ) |
33 | | -from premium_primitives.sub_region_code_to_region import ( # noqa: F401 |
| 44 | +from premium_primitives.sub_region_code_to_region import ( |
34 | 45 | SubRegionCodeToRegion, |
35 | 46 | ) |
36 | | -from premium_primitives.version import __version__ # noqa: F401 |
| 47 | +from premium_primitives.version import __version__ |
37 | 48 |
|
38 | 49 | PREMIUM_PRIMITIVES = [ |
39 | 50 | obj |
|
46 | 57 | ) |
47 | 58 | ] |
48 | 59 |
|
| 60 | +nltk_data_path = pkg_resources.resource_filename( |
| 61 | + "premium_primitives", |
| 62 | + "data/nltk_data/", |
| 63 | +) |
| 64 | +nltk.data.path.insert(0, nltk_data_path) |
| 65 | + |
49 | 66 |
|
50 | 67 | # set data primitives BEFORE we import them |
51 | 68 | premium_primitives_data_folder = pkg_resources.resource_filename( |
|
0 commit comments