Skip to content

fix: refactor listenToStdIn in SentisStrength.java, refactor setParagraph function in Paragraph.java

kaiwen chen requested to merge ckw_dev into master

fix: refactor listenToStdIn in SentisStrength.java I've extracted the different functionality into separate methods to improve readability and maintainability. The listenToStdIn method now only handles reading from standard input and delegates the handling of term weight changes and paragraph classification to separate methods. The getParagraph method handles getting a paragraph object from the input text, and the getOutput method generates the output string based on the paragraph object and the options.

fix: refactor setParagraph function in Paragraph.java The refactored code breaks the code down into smaller methods, making each method focus on one thing and making it easier to understand and maintain. The setParagraph method is used to separate a paragraph into sentences, and the countSentenceEnds method is used to count the number of sentence terminators in the text. The isSentenceEndPunctuation and isAlphanumeric methods are used to determine whether a character is a sentence end and an alphanumeric character, respectively." [ckw_dev 5970a18b] refactor: refactor setParagraph function in Paragraph.java The refactored code breaks the code down into smaller methods, making each method focus on one thing and making it easier to understand and maintain. The setParagraph method is used to separate a paragraph into sentences, and the countSentenceEnds method is used to count the number of sentence terminators in the text. The isSentenceEndPunctuation and isAlphanumeric methods are used to determine whether a character is a sentence end and an alphanumeric character, respectively.

Merge request reports

Loading