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

Memberikan Opsi Stopword Custom dan Menambahkan min_length #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

RyMey
Copy link

@RyMey RyMey commented Sep 19, 2018

  1. Menurut saya stopword custom sangat memungkinkan dalam pemrosesan text, jadi diperlukan untuk penambahan opsi jika user yang menggunakan library ini dapat menggunakan file stopword sendiri

  2. Kemudian, menurut saya opsi min_length juga bisa ditambahkan pada stopword, sehingga jika user memberikan min_length maka string dengan jumlah character kurang akan dihapus juga

*kedua usul ini merupakan opsi yang hanya akan terjadi jika user menambahkan parameter, jadi secara default tetap seperti sebelumnya

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 97.138% when pulling 1d2a244 on RyMey:master into 0ab8ce2 on har07:master.

@coveralls
Copy link

coveralls commented Sep 19, 2018

Coverage Status

Coverage decreased (-0.08%) to 97.293% when pulling e17949d on RyMey:master into 0ab8ce2 on har07:master.

Copy link
Owner

@har07 har07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perlu dipertimbangkan kembali penambahan type hints karena akan menyebabkan pysastrawi tidak lagi support python 2

class StopWordRemoverFactory(object):
"""description of class"""

def create_stop_word_remover(self, words = None):
def create_stop_word_remover(self, words: list = None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keliatannya fitur type hints tidak dikenali di python 2.7 sehingga menyebabkan build error: https://travis-ci.org/har07/PySastrawi/builds/430521968?utm_source=github_status&utm_medium=notification

@@ -7,10 +7,10 @@ def __init__(self, dictionary):
def get_dictionary(self):
return self.dictionary

def remove(self, text):
def remove(self, text, min_length: int = 1):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keliatannya fitur type hints tidak dikenali di python 2.7 sehingga menyebabkan build error: https://travis-ci.org/har07/PySastrawi/builds/430521968?utm_source=github_status&utm_medium=notification

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bagaimana kalau dihapus saja bagian type hints nya (: int )? Sayang sekali kalau harus drop support untuk python 2.7 karena version 2.7 masih banyak beredar (default di ubuntu < 18.04 dll), termasuk di laptop saya 😸

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup gk masalah sih mas, berarti yg gk bisa di python 2.7 cuma :int nya kan?

class StopWordRemoverFactory(object):
"""description of class"""

def create_stop_word_remover(self):
stopWords = self.get_stop_words()
def create_stop_word_remover(self, words: list = None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another type hints detected

Copy link
Owner

@har07 har07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mohon dihilangkan dahulu penggunaan type hints nya. Terima kasih

@har07
Copy link
Owner

har07 commented Sep 20, 2018

Penambahan contoh cara penggunaan 2 parameter baru di atas ke dalam README juga akan sangat membantu

@marantino
Copy link

Selamat malam, mau tanya bagaimana jika mau mengurangi kata yang termasuk kedalam stopwordnya? Terimakasih.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants