#!/usr/bin/perl -T # $Id: makebib.perl,v 1.18 2006/02/06 05:34:04 t Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA use strict; use CGI; my $version = "1.01"; my $debug = 0; my $cgi = 0; $cgi = 1 if( $ENV{"REMOTE_ADDR"} ); foreach (@ARGV) { if( /test/i ) { print STDERR "Test mode!\n"; &test; exit; } elsif( /debug/i ) { $debug = 1; } elsif( /cgi/i ) { $cgi = 1; } elsif( /version/i ) { print "makebib.perl $version (c) 2005 Makino, Takaki.\n" } } if( $cgi ) { print "Content-type: text/html\n\n"; my $cgi = new CGI; my $query = $cgi->param('query'); print "makebib.perl Gateway\n"; print "\n"; print "

makebib.perl Gateway

\n"; print "

Enter citation references below (separate multiple references with two newlines):

\n"; print "
"; my $weborigin = $query; $weborigin =~ s/&/&/g; $weborigin =~ s//>/g; print "\n"; print "
\n"; if( $query ) { print "

Result:

\n"; my $origin; foreach $origin (split(/(?:\n\s*)+\n/,$query)) { $origin =~ s/\s+/ /sg; $origin =~ s/–/-/g; my $result = &process($origin); $origin =~ s/(.{1,67}(?:\s|$))/$1\n /g; $origin =~ s/\n\s+$//s; print "
 \@comment{ $origin }\n$result
"; } } print "

Generated by makebib.perl $version.

\n"; print "\n\n"; } else { my $origin = ""; while(<>) { chop; if( $_ ) { $origin .= $_ . " "; } else { my $result = &process($origin); $origin =~ s/(.{1,67}(?:\s|$))/$1\n /g; $origin =~ s/\n\s+$//s; print " \@comment{ $origin }\n$result\n"; $origin = ""; } } } ################################################################################################## sub process ($) { my ($str) = @_; # strip excess spaces. Add spaces after commas and periods. $str = " " . $str; $str =~ s/(\s(?:[^\:\/\s]|:[^\/\s])*[,.])([^,.\)\s])/\1 \2/g; $str =~ s/(\s(?:[^\:\/\s]|:[^\/\s])*[,.])([^,.\)\s])/\1 \2/g; $str =~ s/^\s+//; $str =~ s/\s+$//; $str =~ s/\s+/ /g; $str =~ s/\)([^:\s])/\) \1/g; $str =~ s/\s([,.])/\1/g; $str =~ s/([0-9]) ?(-{1,3}|:) ([1-9])/\1\2\3/g; print "STR: [$str]\n" if $debug; my @words = split(/ /, $str); my $i = 0; my $btype = "book"; # bibtex type my $bname = "publisher"; # bibtex book title my $as; my $ae; # author start, author end my $ts; my $te; # title start, title end my $js; my $je; # journal start, journal end my $y; # year my $p = ""; # pages my $addline = ""; # additional line my $addline2 = ""; # additional line my $comma = -1; # Last comma position my $peri = -1; # Last period position my $and = -1; # Skip the first word if it is a citation tag $as = 0; if( $words[$i] =~ /^(?:\[.*\]|\([^0-9].*\)|\([0-9]{1,3}\)|[0-9]{1,3}\.)$/ ) { $i++; $as++; } for( ; $i<=$#words; $i++ ) { print "OK-1 $i <$words[$i]>\n" if $debug; if( $words[$i] =~ /^(["'`]+)/ ) { print "Quoting found. author finished\n" if $debug; $ae = $i-1; last; } if( ($words[$i] =~ /^[a-z]/) || ($words[$i] =~ /[0-9]/) ) { # words starting from small letters / words containing numbers if( $words[$i] =~ /^(?:and|&)$/ && $and == -1) { # First 'and' encounter $and = $i; } elsif( $words[$i] =~ /^al\.,?$/ ) { $ae = $i; $i++; last; } elsif( ! ($words[$i] =~ /^(?:von|van|der|de|et|al\.,?)$/) ) { if( $peri == -1 && $comma == -1 && $words[$i] !~ /18[0-9][0-9]|19[0-9][0-9]|20[0-1][0-9]/ ) { die "No author found"; } print "ordinary word! author has been finished $peri $comma\n" if $debug; # non-capitalized words suggest that the author is finished $ae = $peri; # print "($words[$ae-1]) $ae $comma\n"; if( $words[$i] =~ /(18[0-9][0-9]|19[0-9][0-9]|20[0-1][0-9])/ ) { $y = $1; $ae = $i - 1; $i = $i + 1; } else { $ae = $comma if( ($ae == -1 || ($words[$ae-1] =~ /^(?:and|&)$/) || $words[$ae] =~ /^[A-Z]\.$/) && $comma > $ae ); $i = $ae+1; } last; } } if( $words[$i] =~ /\.$/ ) { # If period found $peri = $i; if( $words[$i] =~ /.{2,}\.$/ ) { print "more than two letters preceding the period. author finished\n" if $debug; $ae = $peri; $i++; last; } print "Period!\n" if $debug; } elsif( $words[$i] =~ /,$/ ) { if( $and != -1 && $i > $and+1 && !($words[$i-1] =~ /^[a-z]+$/) ) { print "comma detection more than two words after 'and'. author finished\n" if $debug; $ae = $i; $i++; last; } print "Comma!\n" if $debug; $comma = $i; } } if( $words[$i] =~ /a(18[0-9][0-9]|19[0-9][0-9]|20[0-1][0-9])/ ) { print "OK-year $i <$words[$i]>\n" if $debug; $y = $1; $i++; } elsif( $words[$i-1] =~ /(18[0-9][0-9]|19[0-9][0-9]|20[0-1][0-9])/ ) { print "OK-year $i-1 <$words[$i-1]>\n" if $debug; $y = $1; } my $comma_authorend = (($comma == $ae) ? 1 : 0); my ($title_quote) = $words[$i] =~ /^((?:["'`]|¡Æ|¡Ç)+)/; $title_quote =~ tr/`/'/; $title_quote =~ s/¡Æ/¡Ç/g; print "Begin title search. and = $and, comma = $comma, ae = $ae, comma_authorend = $comma_authorend, title_quote = $title_quote\n" if $debug; $comma = -1; $ts = $i; $te = -1; my $and = -1; for( ; $i<=$#words; $i++ ) { print "OK-2 $i <$words[$i]> $comma $comma_authorend\n" if $debug; if( $words[$i] =~ /^and$/ ) { $and = $i; } if( $title_quote && $words[$i] =~ /$title_quote[,.]?$/ ) { print "Closing quote shows the end of title\n" if $debug; $te = $i; $i++; last; } if( $words[$i] =~ /,$/ && $words[$i] !~ /^(?:vol|pp?|[0-9]+),$/) { if ( $comma >= 0 && $comma_authorend ) { print "Multiple comma in title search. Assume first comma as the end of title\n" if $debug; $te = $comma; $i = $te+1; last; } $comma = $i; } if( $words[$i] =~ /\.$/ ) { if( $and < $comma ) { $te = $comma; } else { $te = $i; } print "Period found. and=$and te=$te\n" if $debug; $i = $te+1; last; } } if( $te == -1 ) { if( $comma != -1 ) { $te = $comma; $i = $te+1; } else { die "Cannot find title!" }; } if( $words[$i] =~ /(18[0-9][0-9]|19[0-9][0-9]|20[0-1][0-9])/ ) { $y = $1; $i++; } $js = $i; $je = -1; $comma = -1; my $colon = -1; my $lastprocess = $i; for( ; $i<=$#words; $i++ ) { print "OK-3 $i <$words[$i]> $comma\n" if $debug; if( $words[$js] =~ /^[Ii]n$/ && $i == $js ) { print "In collection!\n" if $debug; $btype = "incollection"; $bname = "booktitle"; $js++ if $words[$js] =~ /^[Ii]n/; $i++; $lastprocess = $i; } if( $words[$i] =~ /^(?:http|ftp):\/\// ) { print "URL\n" if $debug; my $url = $words[$i]; $url =~ s/[,\.]$//; $url =~ s/([\\~^_%{}\$])/\\$1/g; $addline2 .= ", \n url = \"$url\""; $lastprocess = $i; } elsif( $words[$i] =~ /(?:[Ee]ds?\.|[Ee]ditors?)/ ) { print "editor\n" if $debug; if( $words[$i] =~ /,$/ ) { # In ***, eds., +++. $addline .= " editor = \"" . &nameprocess(join(' ',@words[$js..$i-1])) . "\",\n"; $js = $i+1; $je = -1; } else { # In +++, ***, eds. my $j = $js; my $fc = -1; # first comma for( $j = $js; $j < $i; $j++ ) { $fc = -1 if ( $words[$j] =~ /^[a-z]/ && $words[$j] !~ /van|der|von|de|et|al\.|and/); $fc = $j if ( $fc == -1 && $words[$j] =~ /,$/ ); } if( $fc != -1 ) { $addline .= " editor = \"" . &nameprocess(join(' ',@words[$fc+1..$i-1])) . "\",\n"; $je = $fc; } else { # In ***, eds. +++. $addline .= " editor = \"" . &nameprocess(join(' ',@words[$js..$i-1])) . "\",\n"; $js = $i+1; $je = -1; } } $lastprocess = $i; } elsif( $words[$i] =~ /\b(18[0-9][0-9]|19[0-9][0-9]|20[0-9][0-9])\b/ && ($comma == $i-1 || $words[$i] =~ /^\([0-9]*\)$/ || $words[$i-1] =~ /^(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)$/)) { print "yearmonth\n" if $debug; ($y) = ($words[$i] =~ /\b(1[89][0-9][0-9]|20[0-9][0-9])\b/); $je = $i-1 if( $je == -1 ); if( $words[$i-1] =~ /^(Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|June?|July|Aug(?:ust)?|Sep(?:tember)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\.?$/ ) { my $x = substr($1, 0, 3); $x =~ tr/A-Z/a-z/; $addline .= " month = $x,\n"; $je-- if ( $je == $i-1 ); } $comma = $i if $words[$i] =~ /[,.)]$/; $lastprocess = $i; } elsif( $words[$i] =~ /^([1-9][0-9]*(?:-{1,3}|\?)[1-9][0-9]*)[,\.]?$/ && $comma == $i-1 ) { print "rawpage\n" if $debug; if( ! $p ) { $p = $1; $p =~ s/[,\.]$//; # chop trailing punct $je = $i-1 if( $je == -1 || ($comma == $i-1 && $words[$je] =~ /\.$/)); $lastprocess = $i; } $comma = $i if( $words[$i] =~ /[,.]$/ ); } elsif( $words[$i] =~ /^\(?(?:pp?\.|pages?)$/ ) { print "PP!\n" if $debug; $p = $words[$i+1]; $p =~ s/[\),\.]*$//; # chop trailing punct $p =~ s/(?:-+|\?)/--/; # convert hyphen $je = $i-1 if( $je == -1 ); $i++; $lastprocess = $i; } elsif( $words[$i] =~ /^(vol\.|volume)$/ ) { print "volume! -> " . $words[$i+1] . "\n" if $debug; if( $btype eq "book" ) { $btype = "article"; $bname = "journal"; } my $v = $words[$i+1]; $v =~ s/[,\.]$//; # chop trailing punct if( $v =~ /(.*)\((.*)\)/ ) { $addline .= " volume = \"$1\",\n" . " number = \"$2\",\n" ; } else { $addline .= " volume = \"$v\",\n"; } $je = $i-1 if( $je == -1 ); $i++; $lastprocess = $i; } elsif( ! $y && ($words[$i] =~ /^\(((?:18|19|20)[0-9]*)\)[,.]?$/ ) || ($str !~ /\((?:18|19|20)[0-9]*\)/ && ($words[$i] =~ /^((?:18|19|20)[0-9]*)[,.]?$/ ))) { print "Year\n" if $debug; $y = $1; $comma = $i if $words[$i] =~ /[,.)]$/; $lastprocess = $i; } elsif( $words[$i] =~ /^[0-9\(][-0-9\/\(\)\:\?]*[,\.]?$/ && ($words[$i] =~ /:/ || $comma == $i-1 || ($btype eq "book" && $je != -1))) { print "jnl! $btype $js $je\n" if $debug; if( $btype eq "book" ) { $btype = "article"; $bname = "journal"; } if( $words[$i] =~ /^([1-9][0-9]*)?(?:\(([1-9][0-9\/]*)\))?:([1-9][0-9-]*)[,.]?$/ ) { $addline .= " volume = \"$1\",\n" if $1; $addline .= " volume = \"$2\",\n" if !$1; $addline .= " number = \"$2\",\n" if $1 && $2; $p = $3; } elsif( $words[$i] =~ /^([1-9][0-9]*)\(([1-9][0-9\/]*)\)[,.]?$/ ) { $addline .= " volume = \"$1\",\n number = \"$2\",\n"; } else { my ($digits) = $words[$i] =~ /^([^,\(\)\:]*)[,.]?$/; if( $digits =~ /[0-9]{5,}/ ) { # PRL cheat; $p = $digits; } elsif( $addline =~ /volume = "/ ) { $addline .= " number = \"$digits\",\n"; } else { $addline .= " volume = \"$digits\",\n"; } } $je = $i-1 if( $je == -1 || ($words[$je] =~ /\.$/) ); $comma = $i if( $words[$i] =~ /[,.]$/ ); $lastprocess = $i; } elsif( ! $y && ($words[$i] =~ /^\(([1-9][0-9]*)\)[,.]?$/ ) ) { print "Number\n" if $debug; $addline .= " number = \"$1\",\n"; $lastprocess = $i; } elsif( $words[$i] =~ /^[1-9][-0-9\(\)\:]*[,]?$/ ) { print "NO JNL! $i $comma\n" if $debug; $comma = $i if $words[$i] =~ /,$/; } elsif( $words[$i] =~ /[,\.]$/ && $colon > $lastprocess && $je > 0 ) { print "address&publisher\n" if $debug; my $addresspub = join(' ',@words[$lastprocess+1..$i]); my ($address, $publisher) = $addresspub =~ /(.*):(.*)[,\.]/; $address =~ s/^\s+|\s+$//g; $publisher =~ s/^\s+|\s+$//g; $addline .= " address = \"$address\",\n"; $addline .= " publisher = \"$publisher\",\n"; $colon = 0; $lastprocess = $i; } elsif( $words[$i] =~ /\.$/ ) { if( $je == -1 || $je == $i-1 && $words[$i-1] =~ /\.$/) { print "period - journal end\n" if $debug; $je = $i; $lastprocess = $i; } else { print "period - unknown\n" if $debug; } $comma = $i; } else { print "no match\n" if $debug; } if( $words[$i] =~ /:/ ) { # Colon may indicate publisher and address. $colon = $i; } if( $words[$i] =~ /,$/ ) { $comma = $i; } } my $processauthor = &nameprocess(join(' ',@words[$as..$ae])); my ($bibkey) = $processauthor =~ /([A-Z][-A-Za-z]+)(?:,| and|$)/; $bibkey .= $y; if( $words[$ts] =~ /^(a|an|the)$/i && $ts < $te ) { $bibkey .= $words[$ts+1]; } else { $bibkey .= $words[$ts]; my $tss = $ts; while( $tss < $te && $words[$tss] =~ /^(a|an|the|in|on|at|from|with|to|of|as|by)$/i ) { $bibkey .= $words[++$tss]; } } $bibkey =~ tr/A-Z/a-z/; $bibkey =~ tr/a-z0-9//cd; my $title = join(' ',@words[$ts..$te]); $title =~ s/[,.]$//; $title =~ s/^\"(.*?)(,.)?\"$/$1/; $title =~ s/^\'(.*?)(,.)?\'$/$1/; $title =~ s/^``(.*?)(,.)?''$/$1/; $title =~ s/^`(.*?)(,.)?'$/$1/; $title =~ s/^(?:¡Æ){1,2}(.*?)(,.)?(?:¡Ç){1,2}$/$1/; my $book = join(' ',@words[$js..$je]); $book =~ s/[,.]$//; $p =~ s/-+/--/g; if( $btype eq "book" ) { if( $book =~ /Tech[^ ]* Report/i ) { $btype = "techreport"; $bname = "type"; if( $book =~ s/, (.*)$// ) { $addline .= " institution = \"$1\",\n"; } if( $book =~ s/ ([-\.A-Z0-9 ]+)$// ) { $addline .= " number = \"$1\",\n"; } } } my $result = "\@$btype\{$bibkey,\n" . " author = \"" . $processauthor . "\",\n". " title = \"" . &keepcap($title) . "\",\n"; $result .= " $bname = \"" . &keepcap($book) . "\",\n" if $js <= $je; $result .= $addline; $result .= " pages = \"$p\",\n" if $p; $result .= " year = $y$addline2\n"; $result .= "}\n"; return $result; } ################################################################################################## sub nameprocess ($) { my ($str) = @_; $str =~ s/,$//; $str =~ s/et al\./and others/g; $str =~ s/([a-z])\.$/$1/; $str =~ s/, ([Jj]r)/##$1/g; $str =~ s/,? (?:&|and) /&/g; $str =~ s/^([^ &]+ [^,&]+), /$1&/; while($str =~ s/(&(?:[a-z\.]+ )*[A-Z][^ &]+ [^,&]+), /$1&/) { } $str =~ s/\s*&\s*/ and /g; $str =~ s/##/, /g; return $str; } sub keepcap ($) { my ($str) = @_; if( $str =~ /\s(?!(?:in|on|at|by|with|to|of|for|from|as|and|or|the|a|an)\b)[a-z]/ ) { # STR contains small words; head-capital words should be kept $str =~ s/(\s[^A-Za-z]*)([a-z]*[A-Z][A-Za-z]*)/$1\{$2\}/g; } else { # only oddly capitalized words should be kept $str =~ s/(\s[^A-Za-z]*)([A-Za-z]+[A-Z][A-Za-z]*)/$1\{$2\}/g; } return $str; } ################################################################################################## sub test { my @tests = &testdata; my $error = 0; my $count = 0; while( @tests ) { my $testdata = shift @tests; my $teacher = shift @tests; my $result = process( $testdata ); chomp $teacher; chomp $result; $teacher =~ s/ +$//mg; $result =~ s/ +$//mg; my $steacher = join('\n',sort {$a cmp $b} (split('\n',$teacher))); my $sresult = join('\n',sort {$a cmp $b} (split('\n',$result))); if( $steacher ne $sresult ) { print "Test fail!\n"; print "Test data:\n$testdata\n\n"; print "Correct output:\n$teacher\n"; print "Actual output:\n$result\n"; $debug = 1; process( $testdata ); $debug = 0; $error++; } $count++; } print "$error error(s) in $count tests.\n"; } ################################################################################################## ################################################################################################## ################################################################################################## sub testdata { return ( "Tester, M. and Ikeda, T. Examples of testing models in game tests. Physica D, 136, 123--456. 1897.", '@article{tester1897examples, author = "Tester, M. and Ikeda, T.", title = "Examples of testing models in game tests", journal = "Physica D", volume = "136", pages = "123--456", year = 1897 }', "Takaki Mackino, Yosuke Testo, Ichiro Hanasawa, and Jun-ya Tuji. Example-code test of feature structures. In Moge Poepen, Dan Rass, Jun-ya Tuji, and Hans Azimov, editors, Collaborative Example Testing: A Test Study in Testing Example-based Testing. CSLI Publications, Stanford, CA, March 2099.", '@incollection{mackino2099examplecode, author = "Takaki Mackino and Yosuke Testo and Ichiro Hanasawa and Jun-ya Tuji", title = "Example-code test of feature structures", booktitle = "Collaborative Example Testing: A Test Study in Testing Example-based Testing", editor = "Moge Poepen and Dan Rass and Jun-ya Tuji and Hans Azimov", month = mar, year = 2099 }', "Newton, Isaac, van der Waars, Macky, Strauss, Jr., John et al., The Test Test Test. Temporal, 245, 222-223, 2000.", '@article{newton2000test, author = "Newton, Isaac and van der Waars, Macky and Strauss, Jr., John and others", title = "The Test Test Test", journal = "Temporal", volume = "245", pages = "222--223", year = 2000 }', "Johnson, J. J., Pringles, A. V. M. (1915). Rapid local testization of test examples: Toward investigation with paired test-and-test tests. Proc. Natl. Acad. Sci. USA, 93:3655- 3662.", '@article{johnson1915rapid, author = "Johnson, J. J. and Pringles, A. V. M.", title = "Rapid local testization of test examples: {Toward} investigation with paired test-and-test tests", journal = "Proc. Natl. Acad. Sci. USA", volume = "93", pages = "3655--3662", year = 1915 }', "S. R. Campfire, D. Wong & C. Abdacadabra, Stroyer and destroyer in test-and-test examples, Neural investigation, vol.13, pp.595-619, 2099.", '@article{campfire2099stroyer, author = "S. R. Campfire and D. Wong and C. Abdacadabra", title = "Stroyer and destroyer in test-and-test examples", journal = "Neural investigation", volume = "13", pages = "595--619", year = 2099 }', "H. Hanakai and T. Itoh, testization phenomena in test-paired structures driven by spice-train inputs, IEEE Trans. Neural Networks, 11, 2, pp. 33-35 (2001)", '@article{hanakai2001testization, author = "H. Hanakai and T. Itoh", title = "testization phenomena in test-paired structures driven by spice-train inputs", journal = "IEEE Trans. Neural Networks", volume = "11", number = "2", pages = "33--35", year = 2001 }', "M. Time, F. Tiger, and T. Guitar. Example of regular and irregular examples in complex structures of test-paired examples. Phys. Rev. Lett., 80(25):299999 (2000).", '@article{time2000example, author = "M. Time and F. Tiger and T. Guitar", title = "Example of regular and irregular examples in complex structures of test-paired examples", journal = "Phys. Rev. Lett.", volume = "80", number = "25", pages = "299999", year = 2000 }', "Hogella, R.E., and Scharaka, S.H. 1993. Testization of test-paired biological examples. SIAM J. Appl. Math. 44: 164-166 http://www.example.com/Hello_World.pdf", '@article{hogella1993testization, author = "Hogella, R. E. and Scharaka, S. H.", title = "Testization of test-paired biological examples", journal = "SIAM J. Appl. Math", volume = "44", pages = "164--166", year = 1993, url = "http://www.example.com/Hello\_World.pdf" }', 'Examples Z. Tests, "Fast demonstration of spice examples to periodic tests in testing structures", Physical Review Letters, 88, 258102 (2082).', '@article{tests2082fast, author = "Examples Z. Tests", title = "Fast demonstration of spice examples to periodic tests in testing structures", journal = "Physical Review Letters", volume = "88", pages = "258102", year = 2082 }', "Rabin, M. I., Voltka A., P. Leman, R .Hetta, H.D.I. Abracadabra, and G. Laurence, ``Testing Encoding by Networks of Testing Example Groups: Testless Testition,'' Physical Review Letters vol. 987 (6), 968102/1-4 (2011).", '@article{rabin2011testing, author = "Rabin, M. I. and Voltka A. and P. Leman and R. Hetta and H. D. I. Abracadabra and G. Laurence", title = "Testing Encoding by Networks of Testing Example Groups: Testless Testition", journal = "Physical Review Letters", volume = "987", number = "6", pages = "968102/1--4", year = 2011 }', 'X. Exampiola and A. D{\`\i}az-Funikla. Example example in a lattice of test-paired examples, Phys. Rev. E 60 (1999) 3626-3632.', '@article{exampiola1999example, author = "X. Exampiola and A. D{\`\i}az-Funikla", title = "Example example in a lattice of test-paired examples", journal = "Phys. Rev. E", volume = "60", pages = "3626--3632", year = 1999 }', "H. Test and L. Man. Some Title. In Proc. COLING 2004, 84-88 (2004).", '@incollection{test2004some, author = "H. Test and L. Man", title = "Some Title", booktitle = "Proc. COLING 2004", pages = "84--88", year = 2004 }', 'W. Test, "Test test of teest tests in testical testing," in Test-test theories of the example, C. Example and J. L. Sunny, Eds. Cambridge, MA: NIT Press, 1994, (pp. 201 - 238).', '@incollection{test1994test, author = "W. Test", title = "Test test of teest tests in testical testing", booktitle = "Test-test theories of the example", editor = "C. Example and J. L. Sunny", address = "Cambridge, MA", publisher = "NIT Press", pages = "201--238", year = 1994 }', 'Abcdef, G. H., & Thing, S. (1999). Temporally ecological WS learning, stock timing and special consideration. In M. S. Alpha, S. Pice, & D. Rinkers (Eds.), Advances in economical information systems, 1 (pp. 69?75). Cambridge, MA:NIT Press.', '@incollection{abcdef1999temporally, author = "Abcdef, G. H. and Thing, S.", title = "Temporally ecological {WS} learning, stock timing and special consideration", booktitle = "Advances in economical information systems", editor = "M. S. Alpha and S. Pice and D. Rinkers", volume = "1", address = "Cambridge, MA", publisher = "NIT Press", pages = "69--75", year = 1999 }' ); }