Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: aggregating high-level features #34

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions nlp_profiler/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
PARALLELISATION_METHOD_OPTION, DEFAULT_PARALLEL_METHOD, GRANULAR_OPTION, HIGH_LEVEL_OPTION, \
GRAMMAR_CHECK_OPTION, SPELLING_CHECK_OPTION
from nlp_profiler.generate_features import get_progress_bar
from nlp_profiler.grammar_quality_check import apply_grammar_check
from nlp_profiler.granular_features import apply_granular_features
from nlp_profiler.high_level_features import apply_high_level_features
from nlp_profiler.spelling_quality_check import apply_spelling_check
from nlp_profiler.high_level_features.grammar_quality_check \
import apply_grammar_check
from nlp_profiler.high_level_features.spelling_quality_check \
import apply_spelling_check


def apply_text_profiling(dataframe: pd.DataFrame,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from nlp_profiler.constants import \
SENTIMENT_SUBJECTIVITY_COL, SENTIMENT_SUBJECTIVITY_SCORE_COL, SENTIMENT_SUBJECTIVITY_SUMMARISED_COL
from nlp_profiler.generate_features import generate_features
from nlp_profiler.sentiment_polarity \
from nlp_profiler.high_level_features.sentiment_polarity \
import sentiment_polarity_score, sentiment_polarity, \
sentiment_polarity_summarised
from nlp_profiler.sentiment_subjectivity \
from nlp_profiler.high_level_features.sentiment_subjectivity \
import sentiment_subjectivity_score, \
sentiment_subjectivity_summarised, sentiment_subjectivity

Expand Down
22 changes: 11 additions & 11 deletions notebooks/google-colab/nlp_profiler-granular.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -673,17 +673,17 @@
}
],
"source": [
"from nlp_profiler.emojis import gather_emojis, count_emojis\n",
"from nlp_profiler.numbers import gather_whole_numbers, count_whole_numbers\n",
"from nlp_profiler.alphanumeric import gather_alpha_numeric, count_alpha_numeric\n",
"from nlp_profiler.non_alphanumeric import gather_non_alpha_numeric, count_non_alpha_numeric\n",
"from nlp_profiler.punctuations import gather_punctuations, count_punctuations\n",
"from nlp_profiler.stop_words import gather_stop_words, count_stop_words\n",
"from nlp_profiler.dates import gather_dates, count_dates\n",
"from nlp_profiler.words import gather_words, count_words\n",
"from nlp_profiler.duplicates import gather_duplicates, count_duplicates\n",
"from nlp_profiler.sentences import gather_sentences, count_sentences\n",
"from nlp_profiler.chars_and_spaces import count_chars, count_spaces, count_characters_excluding_spaces"
"from nlp_profiler.granular_features.emojis import gather_emojis, count_emojis\n",
"from nlp_profiler.granular_features.numbers import gather_whole_numbers, count_whole_numbers\n",
"from nlp_profiler.granular_features.alphanumeric import gather_alpha_numeric, count_alpha_numeric\n",
"from nlp_profiler.granular_features.non_alphanumeric import gather_non_alpha_numeric, count_non_alpha_numeric\n",
"from nlp_profiler.granular_features.punctuations import gather_punctuations, count_punctuations\n",
"from nlp_profiler.granular_features.stop_words import gather_stop_words, count_stop_words\n",
"from nlp_profiler.granular_features.dates import gather_dates, count_dates\n",
"from nlp_profiler.granular_features.words import gather_words, count_words\n",
"from nlp_profiler.granular_features.duplicates import gather_duplicates, count_duplicates\n",
"from nlp_profiler.granular_features.sentences import gather_sentences, count_sentences\n",
"from nlp_profiler.granular_features.chars_and_spaces import count_chars, count_spaces, count_characters_excluding_spaces"
]
},
{
Expand Down
Loading