deepsegment icon indicating copy to clipboard operation
deepsegment copied to clipboard

"WARNING:root:Consider using segment_long" when actually using segment_long

Open uguryavuz opened this issue 5 years ago • 1 comments

Bug description I am using segment_long to segment a relatively long paragraph, and despite using this specific function I am getting a repeated warning that reads

WARNING:root:Consider using segment_long for longer sentences.

Snippet which gave this bug

from deepsegment import DeepSegment
segmenter = DeepSegment('en')
...
resegmented = segmenter.segment_long(a_mod)

Specify versions of the following libraries

  1. deepsegment==2.3.1
  2. tensorflow==2.2.0
  3. keras==2.3.1

Expected behavior No warnings at all, given I'm using the suggested function.

Screenshots Screen Shot 2020-07-02 at 17 11 09

Notes This warning message seems to by-pass warnings.filterwarnings('ignore').

uguryavuz avatar Jul 02 '20 21:07 uguryavuz

@uguryavuz I will look into this. Meanwhile,

import logging
logging.basicConfig(level=logging.ERROR)

adding this before deepsegment import will disable warnings.

bedapudi6788 avatar Jul 03 '20 08:07 bedapudi6788