Skip to content

Memberikan Opsi Stopword Custom dan Menambahkan min_length#14

Open
RyMey wants to merge 5 commits into
har07:masterfrom
RyMey:master
Open

Memberikan Opsi Stopword Custom dan Menambahkan min_length#14
RyMey wants to merge 5 commits into
har07:masterfrom
RyMey:master

Conversation

@RyMey

@RyMey RyMey commented Sep 19, 2018

Copy link
Copy Markdown
  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
Copy Markdown

Coverage Status

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

@coveralls

coveralls commented Sep 19, 2018

Copy link
Copy Markdown

Coverage Status

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

@har07 har07 left a comment

Copy link
Copy Markdown
Owner

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

"""description of class"""

def create_stop_word_remover(self, words = None):
def create_stop_word_remover(self, words: list = None):

Copy link
Copy Markdown
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

return self.dictionary

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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?


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

Copy link
Copy Markdown
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

@har07 har07 left a comment

Copy link
Copy Markdown
Owner

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

har07 commented Sep 20, 2018

Copy link
Copy Markdown
Owner

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

@marantino

Copy link
Copy Markdown

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