From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80835 Path: news.gmane.org!not-for-mail From: Marco Patzer Newsgroups: gmane.comp.tex.context Subject: Re: Find too long sentences Date: Fri, 15 Feb 2013 15:52:23 +0100 Message-ID: <20130215145223.GI3733@homerow> References: <511E41F6.5070707@mmnetz.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1129605295==" X-Trace: ger.gmane.org 1360939954 32514 80.91.229.3 (15 Feb 2013 14:52:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2013 14:52:34 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 15 15:52:56 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6Mei-0000IS-Vm for gctc-ntg-context-518@m.gmane.org; Fri, 15 Feb 2013 15:52:53 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3A274101EE; Fri, 15 Feb 2013 15:52:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ehzUYtnQ6Rqc; Fri, 15 Feb 2013 15:52:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 857FF101E3; Fri, 15 Feb 2013 15:52:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 41DF7101E3 for ; Fri, 15 Feb 2013 15:52:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CXo-2GDnosrK for ; Fri, 15 Feb 2013 15:52:29 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 146FD101E0 for ; Fri, 15 Feb 2013 15:52:28 +0100 (CET) Original-Received: from karen.lavabit.com (karen.lavabit.com [72.249.41.33]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r1FF945p025963 for ; Fri, 15 Feb 2013 16:09:05 +0100 Original-Received: from c.earth.lavabit.com (c.earth.lavabit.com [192.168.111.12]) by karen.lavabit.com (Postfix) with ESMTP id 093CE11B9B0 for ; Fri, 15 Feb 2013 08:52:26 -0600 (CST) Original-Received: from homerow (miun111-154.dynamic.miun.se [193.10.111.154]) by lavabit.com with ESMTP id V2511Z2I1B7A for ; Fri, 15 Feb 2013 08:52:26 -0600 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=WudpIHOLIDG1KVWtFvAToSC7MMr6tZkYg53xIFuWY3LQ29zU/Yp+Ft9ewxN/fsTYmqIz7kyw73mEjBdUYtU8zwVPFB0bBlDHYYTcSwt2FXxN1qNcWeZ+AP6GqS2g1xLBnTi3B+GcCOkIi59XMj4gcFRdX2uQAm5KtNwnB9boK5o=; h=Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; Mail-Followup-To: ntg-context@ntg.nl In-Reply-To: <511E41F6.5070707@mmnetz.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Bayes-Prob: 0.0028 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=72.249.41.33; country=US; region=TX; city=Dallas; postalcode=75204; latitude=32.8019; longitude=-96.7883; metrocode=623; areacode=214; http://maps.google.com/maps?q=32.8019,-96.7883&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01J0D95ws - cc6f5e235462 - 20130215 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80835 Archived-At: --===============1129605295== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qyHYMwAXsHLOQihY" Content-Disposition: inline --qyHYMwAXsHLOQihY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2013=E2=80=9302=E2=80=9315 "H. =C3=96zoguz" wrote: > Which text editor can do that, find too long sentences? None, since no editor knows by default what =E2=80=9Ctoo long=E2=80=9D is. = But a few editors (at least vim and I assume emacs as well) have an idea of what a sentence is. Both are scriptable, which means you can tell them what you consider =E2=80=9Ctoo long=E2=80=9D. If you use a different e= ditor read the manual or ask your favourite search engine. In vim pressing =E2=80=9Cvis=E2=80=9D (visualise inner sentence) marks the = current sentence, then pressing =E2=80=9Cg=E2=80=9D yields: Selected 2 of 4 lines; 14 of 50 words; 82 of 296 bytes That means current sentence is 82 bytes long. The rest is up to you. Pick a language you like, vim uses its own scripting language but also has bindings for python, perl, lua, etc. Pseudo-code: go to begin of file start: get byte length of sentence if length > max_length % do something fi move on to the next sentence goto start Or just define a regular expression for a sentence (google is your friend) and use a scripting language directly if your editor is not scriptable. Marco --qyHYMwAXsHLOQihY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJRHkunAAoJEPGqVaNSn0iKvOoH/3IUfyDbbZ0V0up+iV3QHOa9 HALdoUwDjpT/ZQOjKT5gjRlLGqn9y70YDpXiTqgwq8ut0w0pLZZwB5dob7/mVNU0 WkY9+LJ2lgDXDw0zUirBHgpyjIZX1KjxaxFYevygCWmOXcMdQK8RCAFzQgKLkXD0 UM3HcReOjIiEtZX/mSaejQofaWlHwts331YzoAA9otl2lBrL2HOUHfFqHjpW86c/ drHXPLOcZ6hMN2QSIjRXHIE2uizYT3oqoSF6hYMVyoVSlThdaryr09J8U6V7XEyI q2a3QCtp23a+5xFfNx4uJvhGoZgPZ4Awn833W8wJ+8LhWttR8DULu8nlBeTguWk= =zBzq -----END PGP SIGNATURE----- --qyHYMwAXsHLOQihY-- --===============1129605295== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1129605295==--