Comments (6)
Hi! Could you clarify what the fixed line means with some examples? What's the ideal output expected?
from budoux.
never mind ,I managed to that.for example as following.
default as this
echo $'本日は晴天です。\n明日は曇りでしょう。' | budoux
本日は
晴天です。
---
明日は
曇りでしょう。
what I want is fixed line let say 2 because I want to limit words/characters in each line ,then I cal and join the first and last 3 line into new line
@tushuhei
from budoux.
Hmm, sorry I think I need some more clarification.
What is the ideal output for the command echo $'本日は晴天です。\n明日は曇りでしょう。' | budoux
with the parameter you want to have?
from budoux.
since i really dont know japanese ,perhaps this text example isnt that proper, my case is i want to cut long paragpraph into small ones without cutting from middle of sentence, i found your lib is kinda of can do this job.
my idea came into first get raw output of budouX,then line by line count the total words ,
from budoux.
Yes, BudouX can be used to separate a long paragraph into a series of phrases.
If you're interested in counting the phrases (or words) in total, I believe you can get the desired results using sed
and wc
like this:
echo $'本日は晴天です。\n明日は曇りでしょう。' | budoux -d='' | sed '/^$/d' | wc -l
from budoux.
Closing this bug for now, but feel free to reopen if anything.
from budoux.
Related Issues (20)
- [quality] "ありがとうございます。"
- [quality] まとめる HOT 1
- [configuration] Usage on browser's web worker
- [quality] Better Support for Japanese Hiragana Adverbs
- [quality] あなたの意図したとおりに情報を伝えることができます。 HOT 1
- [quality] あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。 HOT 1
- 禁則処理
- Consider to use DocumentFragment
- Styles does not propagate in BudouX Web Components
- Numbers become <a href="tel:">links even if <meta name="format-detection" content="telephone=no"> is set on iOS HOT 4
- Deduplicate separators when processing HTML HOT 3
- Unopened HTML tag causes exception in budoux 0.6 HOT 4
- dart support HOT 1
- [Java] Java version emits close tag for self-closing tags
- [java] `HTMLProcessor.getText()` collapses whitespaces HOT 2
- [quality] "のみ"
- [quality] お問い合わせ
- [quality] いよいよ HOT 1
- Chrome M121 breaks <ruby> unittest HOT 4
- Clarification on the unicode used on the keys HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from budoux.