Re: Finding if a line contains Hebrew characters in perl
(forwarding )to linux-il On Sun, Apr 28, 2013 at 1:56 PM, Meir Guttman wrote: > Dear Gabor and Ido, > > This post to the Il Linux mailing list bounced and wasn't posted since I am > not a member in the list. Please one of you post it so it shows and is > distributed. > > BTW Ido, from your original post I saw that you want to find lines with > (exactly?) three Hebrew characters, so I modified it and it is now: > > #!/usr/bin/env perl -w > # > > use v5.14; > use utf8; > > my $text = 'שלוabv'; > > if ($text =~ /^[\p{HEBREW}]{3}/) { > say "yes"; > } else { > say "no"; > } > > Regards, > Meir > > -Original Message- > From: Gabor Szabo [mailto:szab...@gmail.com] > Sent: יום ו 26 אפריל 2013 09:25 > To: linux-il > Cc: Ori Idan; Meir Guttman > Subject: Re: Finding if a line contains Hebrew characters in perl > >>On Thu, Apr 25, 2013 at 6:05 PM, ik wrote: >>> try this >>> >>> #!/usr/bin/env perl -w >>> # >>> >>> use v5.14; >>> use utf8; >>> >>> my $text = 'שלוabv'; >>> >>> if ($text =~ /^[\x{5D0}-\x{5ea}]{3}/) { >>> say "yes"; >>> } else { >>> say "no"; >>> } >> >>I'd probably use \p{IsHebrew} or \p{InHebrew} instead of the hexa code. >>Check here: http://perldoc.perl.org/perluniprops.html to learn way more than >>you'd probably want to :) >> >>I also CC-ed Meir Guttman who is *the* Perl Unicode expert. >>He might have something more correct to suggest. >> >>Gabor >> > > Well, first I am by no means a "Unicode Expert", let alone *the* expert. All > I have is some experience. > > Anyway, I did use the \p{HEBREW} instead of the "\x{}" and it returned "yes". > Please note, just {HEBREW} and ALL-CAPS! Here it is: > > #!/usr/bin/env perl -w > # > > use v5.14; > use utf8; > > my $text = 'שלוabv'; > > if ($text =~ /^[\p{HEBREW}]/) { > say "yes"; > } else { > say "no"; > } > > I also used "if ($text =~ /^[ש]/) {...}", simply entering the Hebrew letter > "Shin" directly, and it printed "yes" too, signifying that 'ש' is the first > letter. (My editor, as well as MS Outlook, show, from left to right, first > 'ו', then 'ל', then 'ש' and then "abv".) > > I also tried to use the official Unicode name for 'ש' - \p{HEBREW LETTER SHIN} > see http://www.unicode.org/charts/PDF/U0590.pdf , and evidently it isn't > defined. I got a compile time error: "Can't find Unicode property definition > "HEBREW LETTER SHIN" at...". A bit disappointing! > > Try it out! > > Meir ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Literature documentation software
I am preparing to do a (scientific) literature review, in which I am going to look for articles on a topic, read them, and summarize their important content. I would like to do it electronically, in an organized fashion, so I can also search and retrieve information later on. Right now, I print the articles, read and mark important parts, and then write up the content in a text document. My ideal program would have fields for the article name, source (journal, web address, etc.), authors, link to original article (i.e. the pdf file I will save or either a link or a copy of the web page in case of an html page) and summary/comments which I will enter. There should be some searchable record keeping system, where all the articles will be listed and be searchable by field (say, all articles from Washington Post, or Lancet, etc.). If it is online, it would be nice to be able to share access to a document. Can you recommend a program that does that, on Linux or online? Thanks, Z. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Literature documentation software
I'm not sure how relevant it is to your question, but I'm using org-mode in emacs for all my documentation needs. Computers are so fast these days, so that there is almost impossible for a single person to generate more data in e.g. a year than may be found quickly enough by brute force search. I.e. for a database like you propose, one or more linked text files in org-mode should be more than sufficient. org-mode also comes with advanced search options, though I have not yet used them: See: - http://orgmode.org/ - http://orgmode.org/worg/org-tutorials/advanced-searching.html Regards, Dov On Mon, Apr 29, 2013 at 8:09 AM, Steve G. wrote: > I am preparing to do a (scientific) literature review, in which I am going > to look for articles on a topic, read them, and summarize their important > content. > > I would like to do it electronically, in an organized fashion, so I can > also search and retrieve information later on. Right now, I print the > articles, read and mark important parts, and then write up the content in a > text document. > > My ideal program would have fields for the article name, source (journal, > web address, etc.), authors, link to original article (i.e. the pdf file I > will save or either a link or a copy of the web page in case of an html > page) and summary/comments which I will enter. > > There should be some searchable record keeping system, where all the > articles will be listed and be searchable by field (say, all articles from > Washington Post, or Lancet, etc.). > > If it is online, it would be nice to be able to share access to a document. > > Can you recommend a program that does that, on Linux or online? > > Thanks, > > Z. > > ___ > Linux-il mailing list > Linux-il@cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Literature documentation software
There is jabref which is a bibtex management program and can probably be abused for your purpose - i.e you can use the review entry for your notes I like using docear, which is a scientific oriented mindmap program with strong support for paper management. Personally I use it under windows along with acrobat pro to make notes in the paper, it then can automatically find documents in given directories and extract all notes from the papers. I don't know if there is a linux supported pdf markup program that will work with it as well, I think that the KDE one or something like that should work (they have notes on their site. Both of these are written in java so work under linux (acrobat pro unfortunately has no linux version and I couldn't run it under wine either). On 4/29/2013 01:09, Steve G. wrote: I am preparing to do a (scientific) literature review, in which I am going to look for articles on a topic, read them, and summarize their important content. I would like to do it electronically, in an organized fashion, so I can also search and retrieve information later on. Right now, I print the articles, read and mark important parts, and then write up the content in a text document. My ideal program would have fields for the article name, source (journal, web address, etc.), authors, link to original article (i.e. the pdf file I will save or either a link or a copy of the web page in case of an html page) and summary/comments which I will enter. There should be some searchable record keeping system, where all the articles will be listed and be searchable by field (say, all articles from Washington Post, or Lancet, etc.). If it is online, it would be nice to be able to share access to a document. Can you recommend a program that does that, on Linux or online? Thanks, Z. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il