Skip to content

Instantly share code, notes, and snippets.

View HQuser's full-sized avatar

Abdur Rehman HQuser

  • Lahore, Pakistan
View GitHub Profile
@HQuser
HQuser / BM25F.py
Created April 13, 2023 17:16
BM25F Custom Implementation
def preprocess_tokens(text):
from text_preprocessing import preprocess_text
from text_preprocessing import to_lower, remove_email, remove_url, remove_punctuation, lemmatize_word, \
remove_special_character, normalize_unicode, remove_stopword, stem_word, expand_contraction, tokenize_word
preprocess_functions = [remove_special_character, normalize_unicode, to_lower, expand_contraction,
remove_punctuation, remove_stopword, lemmatize_word, stem_word]
return preprocess_text(text, preprocess_functions).split()
def extract_text_snippet(snippet_meta):
@HQuser
HQuser / gradle_error
Created January 14, 2018 09:49
Full gradle stacktrace console
Executing tasks: [:app:assembleDebug]
Parallel execution is an incubating feature.
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.
at org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(CompileOptions.java:273)
at org.gradle.api.tasks.compile.CompileOptions_Decorated.setBootClasspath(Unknown Source)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:77)
at com.android.build.gradle.tasks.factory.JavaCompileConfigAction.execute(JavaCompileConfigAction.java:31)
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:148)
at com.android.build.gradle.internal.TaskContainerAdaptor.create(TaskContainerAdaptor.java:58)