gentle-scholar 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce65a3bc8c479924f3df32d182f17c5c15e23bd8
4
- data.tar.gz: 53f1a91d07fd2ef0412d3e45ceec19e09dca7b63
3
+ metadata.gz: 18a24737821e25fae35759fd4c7abc6c8039fce9
4
+ data.tar.gz: a8ee0ee1a65bca542cbdb7d2492537a6cb4da11e
5
5
  SHA512:
6
- metadata.gz: c192aad613d9fce902912aa87a69b399e5e75fe2b398f98e08f010b9be89b8c393bb2cbe64bb8735c22dd5fee925640d8665c34eb6125a5e7656f1277165e2aa
7
- data.tar.gz: 80855e67f69889ee011d1599010b3c99d6068326f0f4fb749a097f23322fcf266cfb3ffd746adf48d7fd00cd95ac9688bf0959a83e34dc884e95d1dc2d52c83b
6
+ metadata.gz: e251136ef7e1c0ee1dd43caff2868627d4df8d5428048aeefa41dc34c7460541ee69f36bcef7b0d537cb625ff02d55338b6eab2308acfd6cd6c82aedbc19e9da
7
+ data.tar.gz: 2f8a5032590a7f88b21d1379b59520007c44a86400f97562bab33f8b55d9f8704e8333ace11e8e16cdc69639d73d8f185b8f47a7541847ec7bc09ca9c8f0dbf9
data/.travis.yml CHANGED
@@ -4,6 +4,6 @@ rvm:
4
4
  - 2.1.0
5
5
  - 1.9.3
6
6
  - jruby-head
7
- - jruby-19mode
7
+ - jruby-19mode
8
8
  only:
9
9
  - master
data/bin/gentle CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  require 'gentle-scholar'
4
4
 
5
- pub = GentleScholar::Publication.get_from_http('6WjiSOwAAAAJ:9yKSN-GCB0IC')
5
+ if (ARGV.count == 0) || (ARGV[0].split(/:/).count != 2)
6
+ fail ArgumentError, "Usage: gentle [scholarID:paperID]\n"
7
+ end
8
+
9
+ pub = GentleScholar::Publication.get_from_http(ARGV[0])
6
10
 
7
11
  puts 'Publication Details'
8
12
  pub.each do |field, data|
@@ -4,11 +4,7 @@ require 'gentle-scholar/version'
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'gentle-scholar'
6
6
  s.version = GentleScholar::VERSION
7
- s.add_development_dependency 'minitest'
8
- s.add_development_dependency 'minitest-rg'
9
- s.add_runtime_dependency 'nokogiri', '>= 1.6.2'
10
- s.add_runtime_dependency 'typhoeus', '>= 0.6.8'
11
- s.date = '2014-05-27'
7
+ s.date = GentleScholar::DATE
12
8
  s.summary = 'Google Scholar infor extractor'
13
9
  s.description = 'Extract author/paper info from Google Scholar'
14
10
  s.authors = ['Soumya Ray']
@@ -17,4 +13,9 @@ Gem::Specification.new do |s|
17
13
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
14
  s.homepage = 'https://github.com/soumyaray/gentle-scholar'
19
15
  s.license = 'MIT'
16
+
17
+ s.add_development_dependency 'minitest'
18
+ s.add_development_dependency 'minitest-rg'
19
+ s.add_runtime_dependency 'nokogiri', '>= 1.6.2'
20
+ s.add_runtime_dependency 'typhoeus', '>= 0.6.8'
20
21
  end
@@ -13,7 +13,7 @@ module GentleScholar
13
13
 
14
14
  SCAN_STR = {
15
15
  gscholar_url: "//div[contains(@class,'g-section cit-dgb')]"\
16
- "/div/table/tr/td/a",
16
+ '/div/table/tr/td/a',
17
17
  cites: "//div[contains(@id,'scholar_sec')]/div/a",
18
18
  cites_url: "//div[contains(@id,'scholar_sec')]/div/a",
19
19
  title: '//div[@id="title"]/a',
@@ -53,28 +53,37 @@ module GentleScholar
53
53
  res = Typhoeus::Request.new(url).run
54
54
  doc = Nokogiri::HTML(res.response_body)
55
55
 
56
+ extract_from_document(doc)
57
+ end
58
+
59
+ def self.extract_from_document(doc)
56
60
  extract_html_elements(doc).merge(extract_html_table(doc))
57
61
  end
58
62
 
59
63
  def self.extract_html_elements(doc)
60
64
  xpath = Hash[SCAN_STR.map { |elem, path| [elem, doc.xpath(path)] }]
61
65
  elements = SCAN_LAMBDAS.map do |key, lam|
62
- if xpath[key].any? then [key, lam.call(xpath[key])] end
66
+ [key, lam.call(xpath[key])] if xpath[key].any?
63
67
  end
64
68
 
65
69
  Hash[elements.compact]
66
70
  end
67
71
 
68
72
  def self.extract_html_table(doc)
69
- # lambda gets text from right html column given name in left column
70
- table_extract = lambda do |name|
71
- doc.xpath("//div[starts-with(.,'#{name}')]")[0].children[1].text
73
+ elements_a = TABLE_ATTR.map do |k, v|
74
+ extract = table_extract(v, doc)
75
+ extract ? [k, extract] : nil
72
76
  end
77
+ elements = Hash[elements_a.reject { |e| !e }]
73
78
 
74
- elements = Hash[TABLE_ATTR.map { |k, v| [k, table_extract.call(v)] }]
75
79
  elements.merge(
76
80
  Hash[TABLE_LAMBDAS.map { |key, lam| [key, lam.call(elements[key])] }]
77
81
  )
78
82
  end
83
+
84
+ def self.table_extract(name, doc)
85
+ elem = doc.xpath("//div[starts-with(.,'#{name}')]")[0]
86
+ elem.children[1].text if elem
87
+ end
79
88
  end
80
89
  end
@@ -1,3 +1,4 @@
1
1
  module GentleScholar
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
+ DATE = '2014-05-27'
3
4
  end
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html><head><title>Soumya Ray - Google Scholar Citations</title><meta name="robots" content="noarchive"><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=2"><style>@viewport{width:device-width;min-zoom:1;max-zoom:2;}</style><meta name="format-detection" content="telephone=no"><style type="text/css" media="screen, projection">html,body,form,table,div,h1,h2,h3,h4,h5,h6,img,ol,ul,li,button{margin:0;padding:0;border:0;}table{border-collapse:collapse;border-width:0;empty-cells:show;}#gs_top{position:relative;min-width:964px;_width:expression(document.documentElement.clientWidth<966?"964px":"auto");-webkit-tap-highlight-color:rgba(0,0,0,0);}#gs_top>*:not(#x){-webkit-tap-highlight-color:rgba(204,204,204,.5);}.gs_el_ph #gs_top,.gs_el_ta #gs_top{min-width:300px;_width:expression(document.documentElement.clientWidth<302?"300px":"auto");}body,td{font-size:13px;font-family:Arial,sans-serif;line-height:1.24}body{background:#fff;color:#222;-webkit-text-size-adjust:100%;-moz-text-size-adjust:none;}.gs_gray{color:#777777}.gs_red{color:#dd4b39}.gs_grn{color:#3d9400}.gs_lil{font-size:11px}.gs_med{font-size:16px}.gs_hlt{font-weight:bold;}a:link,a:visited{color:#1155cc;text-decoration:none}a:hover,a:active,a:hover .gs_lbl,a:active .gs_lbl,a .gs_lbl:active{text-decoration:underline;outline:none;}a:active,a:active .gs_lbl,a .gs_lbl:active{color:#d14836}a:visited{color:#6611cc}.gs_a,.gs_a a:link,.gs_a a:visited{color:#009933}.gs_a a:active{color:#d14836}a.gs_fl:link,.gs_fl a:link{color:#1155cc}a.gs_fl:visited,.gs_fl a:visited{color:#6611cc}a.gs_fl:active,.gs_fl a:active{color:#d14836}.gs_fl{color:#767676}.gs_ctc,.gs_ctu{font-size:11px;font-weight:bold}.gs_ctc{color:#1122cc}.gs_ctg,.gs_ctg2{font-size:13px;font-weight:bold}.gs_ctg{color:#1155cc}a.gs_pda,.gs_pda a{padding:7px 0 5px 0}a:hover{*background-position:0 0}a:active{*background-attachment:fixed}a.gs_ico:active{*background-attachment:scroll}.gs_alrt{background:#f9edbe;border:1px solid #f0c36d;padding:0 16px;text-align:center;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,.2);box-shadow:0 2px 4px rgba(0,0,0,.2);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}.gs_spc{display:inline-block;width:12px}.gs_br{width:0;font-size:0}.gs_ibl{display:inline-block;*display:inline;zoom:1;}.gs_scl{*zoom:1}.gs_scl:after{content:"";display:table;clear:both;}.gs_ind{padding-left:8px;text-indent:-8px}.gs_ico{display:inline-block;background:no-repeat url(/intl/en/scholar/images/sprite.png);_background-image:url(/intl/en/scholar/images/sprite.gif);width:21px;height:21px;font-size:0;}.gs_el_ta .gs_nta,.gs_ota,.gs_el_ph .gs_nph,.gs_oph{display:none}.gs_el_ta .gs_ota,.gs_el_ph .gs_oph{display:inline}.gs_el_ta div.gs_ota,.gs_el_ph div.gs_oph{display:block}#gs_ftr{margin-top:2em;text-align:center;clear:both;}#gs_ftr a{display:inline-block;margin:0 12px;line-height:29px;}#gs_ftr a:link,#gs_ftr a:visited{color:#1155cc}#gs_ftr a:active{color:#d14836}button{position:relative; z-index:1; -moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:11px;font-weight:bold;cursor:default;height:29px;min-width:72px;_width:72px;overflow:visible;color:#444;border:1px solid #dcdcdc;border:1px solid rgba(0,0,0,.1);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;text-align:center;background-color:#f5f5f5;background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#f1f1f1));background-image:-webkit-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:-moz-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:-o-linear-gradient(top,#f5f5f5,#f1f1f1);background-image:linear-gradient(to bottom,#f5f5f5,#f1f1f1);-webkit-transition:all .218s;-moz-transition:all .218s;-o-transition:all .218s;transition:all .218s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}button .gs_wr{line-height:27px;_line-height:24px;}button .gs_bg{position:absolute;top:0;left:0;width:100%;height:100%;*display:none;z-index:-1;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5',endColorstr='#f1f1f1');}button.gs_btn_mini{min-width:26px;_width:26px;height:26px;}.gs_btn_mini .gs_wr{line-height:24px;_line-height:21px;}button:hover,button.gs_hvr{z-index:2;color:#222;border:1px solid #c6c6c6;-webkit-box-shadow:0px 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0px 1px 1px rgba(0,0,0,.1);box-shadow:0px 1px 1px rgba(0,0,0,.1);background-color:#f8f8f8;background-image:-webkit-gradient(linear,left top,left bottom,from(#f8f8f8),to(#f1f1f1));background-image:-webkit-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:-moz-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:-o-linear-gradient(top,#f8f8f8,#f1f1f1);background-image:linear-gradient(to bottom,#f8f8f8,#f1f1f1);-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s;}button:hover .gs_bg,button.gs_hvr .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#f8f8f8',EndColorStr='#f1f1f1');}button.gs_sel{color:#333;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);background-color:#e8e8e8;background-image:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#e0e0e0));background-image:-webkit-linear-gradient(top,#eee,#e0e0e0);background-image:-moz-linear-gradient(top,#eee,#e0e0e0);background-image:-o-linear-gradient(top,#eee,#e0e0e0);background-image:linear-gradient(to bottom,#eee,#e0e0e0);}button.gs_sel .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#eeeeee',EndColorStr='#e0e0e0');}button:active,button.gs_act{z-index:2;color:#333;background-color:#f6f6f6;background-image:-webkit-gradient(linear,left top,left bottom,from(#f6f6f6),to(#f1f1f1));background-image:-webkit-linear-gradient(top,#f6f6f6,#f1f1f1);background-image:-moz-linear-gradient(top,#f6f6f6,#f1f1f1);background-image:-o-linear-gradient(top,#f6f6f6,#f1f1f1);background-image:linear-gradient(to bottom,#f6f6f6,#f1f1f1);-webkit-box-shadow:inset 0px 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0px 1px 2px rgba(0,0,0,.1);box-shadow:inset 0px 1px 2px rgba(0,0,0,.1);}button:active .gs_bg,button.gs_act .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#f6f6f6',EndColorStr='#f1f1f1');}button:focus,button.gs_fcs{z-index:2;outline:none;border:1px solid #4d90fe;}button::-moz-focus-inner{padding:0;border:0}button .gs_lbl{padding:0px 8px;}a.gs_in_ib{position:relative;display:inline-block;line-height:16px;padding:5px 0 6px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}a.gs_btn_mini{height:24px;line-height:24px;padding:0;}a .gs_lbl,button .gs_lbl{vertical-align:baseline;}a.gs_in_ib .gs_lbl{display:inline-block;padding-left:21px}button.gs_in_ib .gs_lbl{padding-left:29px;}button.gs_btn_mini .gs_lbl,button.gs_btn_eml .gs_lbl{padding:11px;}.gs_in_ib .gs_ico{position:absolute;top:2px;*top:3px;left:8px;}.gs_btn_mini .gs_ico{top:1px;*top:2px;left:2px;}.gs_btn_eml .gs_ico{left:25px}button.gs_btn_mini,.gs_btn_eml{_font-size:0}a.gs_in_ib .gs_ico{top:3px;left:0}a.gs_in_ib-gs_md_li .gs_ico{left:14px}.gs_el_tc a.gs_in_ib-gs_md_li .gs_ico{top:11px}a.gs_btn_mini .gs_ico{top:1px;left:0}button.gs_btn_act{color:#fff;-webkit-font-smoothing:antialiased;border:1px solid #3079ed;background-color:#4d90fe;background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#4787ed));background-image:-webkit-linear-gradient(top,#4d90fe,#4787ed);background-image:-moz-linear-gradient(top,#4d90fe,#4787ed);background-image:-o-linear-gradient(top,#4d90fe,#4787ed);background-image:linear-gradient(to bottom,#4d90fe,#4787ed);}button.gs_btn_act .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4d90fe',endColorstr='#4787ed');}button.gs_btn_act:hover,button.gs_btn_act-gs_hvr{color:#fff;border:1px solid #2f5bb7;background-color:#357ae8;background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8));background-image:-webkit-linear-gradient(top,#4d90fe,#357ae8);background-image:-moz-linear-gradient(top,#4d90fe,#357ae8);background-image:-o-linear-gradient(top,#4d90fe,#357ae8);background-image:linear-gradient(to bottom,#4d90fe,#357ae8);-webkit-box-shadow:inset 0px 1px 1px rgba(0,0,0,.1);-moz-box-shadow:inset 0px 1px 1px rgba(0,0,0,.1);box-shadow:inset 0px 1px 1px rgba(0,0,0,.1);}button.gs_btn_act:hover .gs_bg,button.gs_btn_act-gs_hvr .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4d90fe',endColorstr='#357ae8');}button.gs_btnG{width:70px;min-width:0;}button.gs_btn_act:focus{-webkit-box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);-moz-box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);box-shadow:inset 0 0 0 1px rgba(255,255,255,.5);}button.gs_btn_act:focus,button.gs_btn_act-gs_fcs{border-color:#404040;}button.gs_btn_act:active,button.gs_btn_act-gs_act{border:1px solid #315da3;background-color:#2f6de1;background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#2f6de1));background-image:-webkit-linear-gradient(top,#4d90fe,#2f6de1);background-image:-moz-linear-gradient(top,#4d90fe,#2f6de1);background-image:-o-linear-gradient(top,#4d90fe,#2f6de1);background-image:linear-gradient(to bottom,#4d90fe,#2f6de1);}button.gs_btn_act:active .gs_bg,button.gs_btn_act-gs_act .gs_bg{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4d90fe',endColorstr='#2f6de1');}button.gs_btn_act:active{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.3);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.3);box-shadow:inset 0 1px 2px rgba(0,0,0,.3);}.gs_ttp{position:absolute;top:100%;right:50%;z-index:10;pointer-events:none;visibility:hidden;opacity:0;-webkit-transition:visibility 0s .13s,opacity .13s ease-out;-moz-transition:visibility 0s .13s,opacity .13s ease-out;-o-transition:visibility 0s .13s,opacity .13s ease-out;transition:visibility 0s .13s,opacity .13s ease-out;}button:hover .gs_ttp,button.gs_hvr .gs_ttp,button:focus .gs_ttp,button.gs_fcs .gs_ttp,a:hover .gs_ttp,a:focus .gs_ttp{-webkit-transition:visibility 0s .3s,opacity .13s ease-in .3s;-moz-transition:visibility 0s .3s,opacity .13s ease-in .3s;-o-transition:visibility 0s .3s,opacity .13s ease-in .3s;transition:visibility 0s .3s,opacity .13s ease-in .3s;visibility:visible;opacity:1;}.gs_ttp .gs_aro,.gs_ttp .gs_aru{position:absolute;top:-2px;right:-5px;width:0;height:0;line-height:0;font-size:0;border:5px solid transparent;_border:5px solid #f5f5f5;border-top:none;border-bottom-color:#2a2a2a;z-index:1;}.gs_ttp .gs_aro{top:-3px;right:-6px;border-width:6px;border-top:none;border-bottom-color:white;}.gs_ttp .gs_txt{display:block;position:relative;top:2px;right:-50%;padding:7px 9px;background:#2a2a2a;color:white;font-size:11px;font-weight:bold;line-height:normal;white-space:nowrap;border:1px solid white;-webkit-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);-moz-box-shadow:inset 0 1px 4px rgba(0,0,0,.2);box-shadow:inset 0 1px 4px rgba(0,0,0,.2);}.gs_in_se,.gs_tan{-ms-touch-action:none;touch-action:none;}.gs_in_se .gs_lbl{padding-left:8px;padding-right:22px;}.gs_in_se .gs_ico{position:absolute;top:8px;right:8px;width:7px;height:11px;margin:0;background-position:-63px -115px;}a.gs_in_se .gs_ico{background-position:-100px -26px;}.gs_in_se:hover .gs_ico,.gs_in_se-gs_hvr .gs_ico,a.gs_in_se-gs_hvr .gs_ico{background-position:-166px -110px;}.gs_in_se:active .gs_ico,.gs_in_se .gs_ico:active,.gs_in_se.gs_in_se-gs_act .gs_ico{background-position:-89px -26px;}.gs_in_se :active~.gs_ico{background-position:-89px -26px;}.gs_btn_mnu .gs_ico{height:7px;background-position:-63px -119px;}.gs_btn_mnu:hover .gs_ico,.gs_btn_mnu-gs_hvr .gs_ico{background-position:-166px -114px;}.gs_btn_mnu:active .gs_ico,.gs_btn_mnu .gs_ico:active,.gs_btn_mnu.gs_btn_mnu-gs_act .gs_ico{background-position:-89px -30px;}.gs_btn_mnu :active~.gs_ico{background-position:-89px -30px;}.gs_md_se,.gs_md_wn,.gs_el_ph .gs_md_wp{position:absolute;top:0;left:0;border:1px solid #ccc;border-color:rgba(0,0,0,.2);background:white;-webkit-box-shadow:0px 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0px 2px 4px rgba(0,0,0,.2);box-shadow:0px 2px 4px rgba(0,0,0,.2);z-index:1100; display:none;opacity:0;-webkit-transition:opacity .13s;-moz-transition:opacity .13s;-o-transition:opacity .13s;transition:opacity .13s;}.gs_md_se.gs_vis,.gs_md_wn.gs_vis,.gs_el_ph .gs_md_wp.gs_vis{opacity:1;-webkit-transition:all 0s;-moz-transition:all 0s;-o-transition:all 0s;transition:all 0s;}.gs_el_tc .gs_md_se,.gs_el_tc .gs_md_wn,.gs_el_ph.gs_el_tc .gs_md_wp{-webkit-transform-origin:100% 0;-moz-transform-origin:100% 0;-o-transform-origin:100% 0;transform-origin:100% 0;-webkit-transform:scale(1,0);-moz-transform:scale(1,0);-o-transform:scale(1,0);transform:scale(1,0);-webkit-transition:opacity .218s ease-out,-webkit-transform 0s .218s;-moz-transition:opacity .218s ease-out,-moz-transform: 0s .218s;-o-transition:opacity .218s ease-out,-o-transform: 0s .218s;transition:opacity .218s ease-out,transform 0s .218s;}.gs_el_ios .gs_md_se,.gs_el_ios .gs_md_wn,.gs_el_ph.gs_el_ios .gs_md_wp{-webkit-backface-visibility:hidden;}.gs_el_tc .gs_md_wn.gs_ttss,.gs_el_ph.gs_el_tc .gs_md_wp.gs_ttss{-webkit-transform:scale(0,1);-moz-transform:scale(0,1);-o-transform:scale(0,1);transform:scale(0,1);}.gs_el_tc .gs_md_wn.gs_ttzi,.gs_el_ph.gs_el_tc .gs_md_wp.gs_ttzi{-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-o-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-transform:scale(0,0);-moz-transform:scale(0,0);-o-transform:scale(0,0);transform:scale(0,0);}.gs_el_tc .gs_md_se.gs_vis,.gs_el_tc .gs_md_wn.gs_vis,.gs_el_ph.gs_el_tc .gs_md_wp.gs_vis{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-o-transform:scale(1,1);transform:scale(1,1);-webkit-transition:-webkit-transform .218s ease-out;-moz-transition:-moz-transform .218s ease-out;-o-transition:-o-transform .218s ease-out;transition:transform .218s ease-out;}.gs_md_se{white-space:nowrap}.gs_md_se ul{list-style-type:none;word-wrap:break-word;display:inline-block;*display:inline;zoom:1;vertical-align:top;}.gs_md_se li,.gs_md_li,.gs_md_li:link,.gs_md_li:visited{display:block;padding:6px 44px 6px 16px;font-size:13px;line-height:16px;color:#222;cursor:default;text-decoration:none;background:white;-moz-transition:background .13s;-o-transition:background .13s;-webkit-transition:background .13s;transition:background .13s;}a.gs_md_li:hover .gs_lbl,a.gs_md_li:active .gs_lbl{text-decoration:none}.gs_el_tc .gs_md_se li,.gs_el_tc .gs_md_li{padding-top:14px;padding-bottom:10px;}.gs_md_se li:hover,.gs_md_se li.gs_hvr,.gs_md_se li.gs_fcs,.gs_md_li:hover,.gs_md_li:focus,.gs_md_li-gs_fcs:link,.gs_md_li-gs_fcs:visited{background:#f1f1f1;-moz-transition:background 0s;-o-transition:background 0s;-webkit-transition:background 0s;transition:background 0s;}.gs_md_se li.gs_sel{color:#dd4b39}.gs_md_wn:focus,.gs_md_se li:focus,.gs_md_li:focus{outline:none}button.gs_btnG .gs_ico{width:14px;height:13px;top:7px;left:27px;background-position:-152px -68px;_background:transparent;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/intl/en/scholar/images/sprite/search-shared.png');}p,dl,dt,dd,caption,tbody,tfoot,thead,tr,th,td,fieldset{margin:0;padding:0;border:0}body {font-size:62.5%;color:#000;}#gs_top {padding:3px 8px;min-width:none;width:auto}a:link,a:visited {color:#00c;}a:active {color:red}ul {padding:0 0 1em 1em}ol {padding:0 0 1em 1.3em}li {line-height:1.5em;padding:0 0 .5em 0}p {padding:0 0 1em 0}h1,h2,h3,h4,h5 {padding:0 0 1em 0}h1,h2 {font-size:1.3em}h3 {font-size:1.1em}h4,h5,table {font-size:1em}sup,sub {font-size:.7em}input,select,textarea,option{font-family:inherit;font-size:inherit}.g-doc,.g-doc-1024,.g-doc-800 {font-size:130%}.g-doc {width:100%;text-align:left}.g-section:after {content:".";display:block;height:0;clear:both;visibility:hidden}.g-unit .g-section:after {clear:none}.g-unit .g-section {width:100%;overflow:hidden}.g-section,.g-unit {zoom:1}.g-split .g-unit {text-align:right}.g-split .g-first {text-align:left}.g-tpl-50-50 .g-unit,.g-unit .g-tpl-50-50 .g-unit,.g-unit .g-unit .g-tpl-50-50 .g-unit,.g-unit .g-unit .g-unit .g-tpl-50-50 .g-unit {width:49.999%;float:right;display:inline;margin:0}.g-unit .g-unit .g-unit .g-tpl-50-50 .g-first,.g-unit .g-unit .g-tpl-50-50 .g-first,.g-unit .g-tpl-50-50 .g-first,.g-tpl-50-50 .g-first {width:49.999%;float:left;display:inline;margin:0}.g-tpl-50-50-alt .g-unit,.g-unit .g-tpl-50-50-alt .g-unit,.g-unit .g-unit .g-tpl-50-50-alt .g-unit,.g-unit .g-unit .g-unit .g-tpl-50-50-alt .g-unit {width:49.999%;float:left;display:inline;margin:0}.g-unit .g-unit .g-unit .g-tpl-50-50-alt .g-first,.g-unit .g-unit .g-tpl-50-50-alt .g-first,.g-unit .g-tpl-50-50-alt .g-first,.g-tpl-50-50-alt .g-first {width:49.999%;float:right;display:inline;margin:0}.g-tpl-nest .g-unit,.g-unit .g-tpl-nest .g-unit,.g-unit .g-unit .g-tpl-nest .g-unit,.g-unit .g-unit .g-unit .g-tpl-nest .g-unit {float:left;width:auto;display:inline;margin:0}.g-tpl-nest-alt .g-unit,.g-unit .g-tpl-nest-alt .g-unit,.g-unit .g-unit .g-tpl-nest-alt .g-unit,.g-unit .g-unit .g-unit .g-tpl-nest-alt .g-unit {float:right;width:auto;display:inline;margin:0}.g-doc-1024 {width:73.074em;_width:950px;min-width:950px;margin:0 auto;text-align:left}.cit-bluegray, .cit-bluegray:visited {color: #77c;}.cit-gray {color: #666;}table.cit-bodytable {width: 100%;}td.cit-contentcell {vertical-align: top;}.cit-body b {background:#9fd9a7;display:block;height:1px;overflow:hidden;margin:0 2px;font-size:1px;line-height:1px;}.cit-body i {background:#9fd9a7;display:block;height:1px;overflow:hidden;margin:0 1px;font-size:1px;line-height:1px;}.cit-messagebox {text-align: center;}.cit-messagebox b {background: #fff1a8;display:block;height:1px;overflow:hidden;margin:0 2px;font-size:1px;line-height:1px;}.cit-messagebox i {background: #fff1a8;display:block;height:1px;overflow:hidden;margin:0 1px;font-size:1px;line-height:1px;}.cit-messagebox a {color: #00c;}.cit-messagebox.reqfield {text-align: left;padding: 0 0 0 0;color: #000;}.cit-messagebox table {display: inline;text-align: center;}.cit-messagebox div#message_text {background: #fff1a8;padding: 0.1em 0.5em;font-weight: bold;}.cit-actionbar {background: #9fd9a7;padding: 0.3em 0.6em;}.cit-actionbar.pagination {padding: 0 0 0 0;float: right;}.cit-fieldrows {padding-top: 0.5em;}.g-tpl-200 .g-unit,.g-unit .g-tpl-200 .g-unit,.g-unit .g-unit .g-tpl-200 .g-unit,.g-unit .g-unit .g-unit .g-tpl-200 .g-unit {display: block;margin: 0 0 0 200px;width: auto;float: none;}.g-unit .g-unit .g-unit .g-tpl-200 .g-first,.g-unit .g-unit .g-tpl-200 .g-first,.g-unit .g-tpl-200 .g-first,.g-tpl-200 .g-first {display: block;margin: 0;width: 200px;float: left;}.cit-near-box {background-color: #FFC;position: absolute;z-index: 1;/* more padding on right makes "close window" img prettier */padding: 5px 20px 5px 5px;border: 1px solid #CCC;}/* rounded corner outside */div.cit-rco {display:block;height:1px;overflow:hidden;margin:0 2px;font-size:1px;line-height:1px;}/* rounded corner inside */div.cit-rci {display:block;height:1px;overflow:hidden;margin:0 1px;font-size:1px;line-height:1px;}/* light blue background */.cit-lbb {background-color:#E8F4F7;}/* dark green background */.cit-dgb {background-color:#9FD9A7;}/* light green background */.cit-lgb {background-color:#DCF6DB;}.cit-dark-link {text-decoration: none;}.cit-light-link,.cit-light-link:visited {text-decoration: none;color: #4272db;}.cit-bg-link,.cit-bg-link:visited {text-decoration: none;color: #77c;}.cit-dark-large-link {font-size: 120%;text-decoration: none;}.cit-lclgs {padding-left: 1em;padding-top: 0.33em;padding-bottom: 0.33em;border-right: 2px solid #9fd9a7;}.cit-lclgsr {float: right;padding-right: 1em;}.cit-lclgsc {margin-top: 0.6em;float: left;}.cit-scdel {margin-top: 0.6em;margin-bottom: 0.6em;}/* Used for profile photo and name/affiliation */.g-tpl-150 .g-unit,.g-unit .g-tpl-150 .g-unit,.g-unit .g-unit .g-tpl-150 .g-unit,.g-unit .g-unit .g-unit .g-tpl-150 .g-unit {display: block;margin: 0 0 0 150px;width: auto;float: none;}.g-unit .g-unit .g-unit .g-tpl-150 .g-first,.g-unit .g-unit .g-tpl-150 .g-first,.g-unit .g-tpl-150 .g-first,.g-tpl-150 .g-first {display: block;margin: 0;width: 150px;float: left;}.g-tpl-100 .g-unit,.g-unit .g-tpl-100 .g-unit,.g-unit .g-unit .g-tpl-100 .g-unit,.g-unit .g-unit .g-unit .g-tpl-100 .g-unit {display: block;margin: 0 0 0 100px;width: auto;float: none;}.g-unit .g-unit .g-tpl-100 .g-first,.g-unit .g-unit .g-unit .g-tpl-100 .g-first,.g-unit .g-tpl-100 .g-first, .g-tpl-100 .g-first {display: block;margin: 0;width: 100px;float: left;}.cit-photo-placeholder {text-align: center;}.cit-photo {padding: 1px;border: solid #9fd9a7 1px;vertical-align: top;}.cit-definition {font-size: 1em;padding: 1em;}.cit-definition.emphasis {font-style: italic;}/* BEGIN used for in-place editing */#cit-name-display,#cit-name-input {font-size: 32px;}#cit-name-input {background-color: #FFFFCC;}#cit-affiliation-input,#cit-int-input,#cit-domain-input,#cit-homepage-input {background-color: #FFFFCC;font-size: 120%}#cit-affiliation-display,#cit-int-display,#cit-domain-display,#cit-publish-display,#cit-homepage-display {font-size: 120%;}#cit-name-input {width: 10em;}#cit-affiliation-input,#cit-int-input,#cit-domain-input,#cit-homepage-input {width: 25em;}.cit-in-place-hover {background-color: #FFC;border: 1px solid #CCC;}.cit-in-place-nohover {background-color: auto;border: 1px solid white;}.cit-inplaceaction, cit-inplaceaction:visited {font-size: 0.85em;text-decoration: none;color: #4272db;}.cit-inplaceform {padding: 1px;}/* END used for in-place editing */.cit-user-info {margin-top: 8px;}/* 250px alt *//* Right-column on myworks page. */.g-tpl-250-alt .g-unit,.g-unit .g-tpl-250-alt .g-unit,.g-unit .g-unit .g-tpl-250-alt .g-unit,.g-unit .g-unit .g-unit .g-tpl-250-alt .g-unit {margin: 0 250px 0 0;width: auto;float: none;}.g-unit .g-unit .g-unit .g-tpl-250-alt .g-first,.g-unit .g-unit .g-tpl-250-alt .g-first,.g-unit .g-tpl-250-alt .g-first,.g-tpl-250-alt .g-first {margin: 0;width: 250px;float: right;}.cit-fieldbox {padding: 0 0.5em 0.5em 0.5em;}.cit-fieldbox i,.cit-fieldbox u,.cit-fieldbox .cit-dl {background: #e8f4f7;}.cit-fieldbox i {display:block;height:1px;overflow:hidden;margin:0 1px;font-size:1px;line-height:1px;}.cit-fieldbox u {display:block;height:1px;overflow:hidden;margin:0 2px;font-size:1px;line-height:1px;}.cit-fieldbox .cit-dl {background: #e8f4f7;padding: 0.5em;}.cit-fieldbox .cit-dd,.cit-fieldbox .cit-dt {padding-top: 0.2em;padding-bottom: 0.2em;}.cit-fieldbox .cit-dt {float: left;width: 10em;}.cit-fieldbox .cit-dd {margin-left: 10em;}.cit-fieldbox div#labels-sec .cit-dd,.cit-fieldbox div#labels-sec .cit-dt {padding-top: 0.5em;padding-bottom: 0.5em;}.cit-fieldbox #labels table {padding-right: 0.2em;}.cit-fieldbox input.cit-text {margin-top: -0.3em;margin-bottom: 0.2em;margin-right: 0.2em;width: 95%;}.cit-fieldbox div#authors_sec input {margin-top: 0;margin-bottom: 0.1em;}.cit-fieldbox div#title {font-size: 120%;}.cit-fieldbox input#title {font-size: 100%;}.cit-fieldbox.main div#scholar_sec a,.cit-fieldbox.main div#scholar_sec a:visited {color: #7777cc;}.cit-fieldbox.main div#authors_sec a,.cit-fieldbox.main div#authors_sec a:visited {color: #060;}.cit-fieldbox.pubdate input {margin-top: 0.5em;}.cit-fieldbox tr#authors_infotext {color: #666;}.cit-fieldbox table#authors {width: 100%;}</style><script type="text/javascript">function citGetById(id) {return document.getElementById(id);}function citHide(id) {var elem = citGetById(id);if (!elem) return;elem.style.display = "none";return false;}function citShow(id, type) {var elem = citGetById(id);if (!elem) return;elem.style.display = type;return false;}function citSubmit(id) {var form = citGetById(id);if (form) form.submit();return false;}function citFocus(id) {var elem = citGetById(id);if (!elem) return;elem.focus();return false;}function citGo(url) {window.location = url;}function citOnActionsSelect(id, add_url, list_trash_url,list_updates_url) {var select = citGetById(id);if (!select) {return;}if (select.value == "add_opt") {citGo(add_url);} else if (select.value == "list_trash_opt") {citGo(list_trash_url);} else if (select.value == "list_updates_opt") {citGo(list_updates_url);} else {citSubmit("citationsForm");}}function citToggleElem(id, displaytype) {var elem = citGetById(id);if (!elem) return;if (elem.style.display == displaytype) {elem.style.display = "none";} else {elem.style.display = displaytype;}return false;}function citClearTextHint(id, hint) {var elem = citGetById(id);if (!elem) return;if (elem.style.color == "gray" && elem.value == hint) {elem.value = "";elem.style.color = "black";} else if (elem.style.color == "gray" && elem.value != hint) {elem.style.color = "black";}return false;}function citSetTextHint(id, hint) {var elem = citGetById(id);if (!elem) return;if (elem.style.color == "black" && elem.value == "") {elem.value = hint;elem.style.color = "gray";}return false;}function citShowNearBox(near_me, message, vurl, vtext, hurl, htext) {var box = citGetById("cit-near-box");if (!box) {box = document.createElement("div");box.setAttribute("id", "cit-near-box");box.setAttribute("class", "cit-near-box");near_me.parentNode.appendChild(box);}box.innerHTML = message + " (<a href=\"" + vurl + "\">" + vtext + "</a> - <a href=\"" + hurl + "\">" + htext + "</a>) <img onclick=\"citHideNearBox()\" style=\"position: absolute; top:2px; right: 2px;\" src=\"/citations/images/remove.gif\"/>";box.style.display = "block";}function citHideNearBox() {var box = citGetById("cit-near-box");if (box) {box.style.display = "none";box.parentNode.removeChild(box);}}function citToggleNearBox(near_me, message, vurl, vtext, hurl, htext) {var box = citGetById("cit-near-box");if (box &&box.style.display == "block" &&near_me.parentNode == box.parentNode) {citHideNearBox();} else {citHideNearBox();citShowNearBox(near_me, message, vurl, vtext, hurl, htext);}}function citMessageDisplay(msgBox, display) {if (!msgBox) return;try {msgBox.style.visibility = display;} catch (ex) {msgBox.setAttribute("style", "visibility: " + display);}}function citSelectAll() {var form = citGetById("citationsForm");for (var i = 0; i < form.elements.length; i++) {if (form.elements[i].type != "checkbox") continue;form.elements[i].checked = true;}}function citSelectNone() {var form = citGetById("citationsForm");for (var i = 0; i < form.elements.length; i++) {if (form.elements[i].type != "checkbox") continue;form.elements[i].checked = false;}}function citInPlaceMouseOver(field) {citGetById("cit-" + field + "-display").className = "cit-in-place-hover";}function citInPlaceMouseOut(field) {citGetById("cit-" + field + "-display").className = "cit-in-place-nohover";}function citInPlaceResetAndEdit(field) {citInPlaceReset(field);citInPlaceEdit(field);}function citGetTextContent(id) {var elem = citGetById(id);if (!elem) return "";if (elem.innerText != undefined) {/* IE, Safari, Chrome, Opera */return elem.innerText;} else if (elem.textContent) {/* IE9, Firefox, Safari, Chrome, Opera */return elem.textContent;}return "";}function citInPlaceReset(field) {/* Reset the edit field to the current value. */if (field == "int" || field == "domain" || field == "homepage") {var currval = citGetTextContent("cit-" + field + "-prefill");} else {var currval = citGetTextContent("cit-" + field + "-display");}var input = citGetById("cit-" + field + "-input");input.value = currval;}function citInPlaceEdit(field) {/* Hide display field and show input box. */citHide("cit-" + field + "-read");citShow("cit-" + field + "-write", "inline");var input = citGetById("cit-" + field + "-input");if (input) input.focus();}function citInPlaceShow(field) {citHide("cit-" + field + "-read");citShow("cit-" + field + "-write", "inline");}function citInPlaceCancel(field) {/* Hide input box and show display field. */citHide("cit-" + field + "-write");citShow("cit-" + field + "-read", "inline");}function citToggleIndexDef(id) {var index_def = citGetById(id);if (!index_def) return;if (index_def.style.display &&index_def.style.display == "block") {citHideAllIndexDefs();} else {citHideAllIndexDefs();citShow(id, "block");}return false;}function citHideAllIndexDefs() {citHide('h_index_definition');citHide('i_ten_index_definition');citHide('total_citations_definition');citHide('h5_index_definition');citHide('h5_median_definition');return false;}function citMessageBox(messageBox, messageText) {this.messageBox = citGetById(messageBox);this.messageText = citGetById(messageText);this.timeoutId = null;}citMessageBox.prototype.hideMessage = function () {citMessageDisplay(this.messageBox, "hidden");};citMessageBox.prototype.showMessage = function (newText) {if (!newText) {this.hideMessage();} else {this.messageText.innerHTML = newText;citMessageDisplay(this.messageBox, "visible");this.setHideMessageTimeout();}};citMessageBox.prototype.setHideMessageTimeout = function () {this.cancelHideMessageTimeout();var _self = this;this.timeoutId = setTimeout(function () {_self.hideMessage();}, 60000);};citMessageBox.prototype.cancelHideMessageTimeout = function () {try {clearTimeout(this.timeoutId);} catch (ex) {/* Don't care. */}this.timeoutId = null;};var citGCMessageBox;function citInitGlobals() {citGCMessageBox = new citMessageBox("message_box", "message_text");var showMsg = citGetById("cit-show-msg");var shownMsg = citGetById("cit-shown-msg");if (showMsg && showMsg.value && !(shownMsg && shownMsg.value)) {if (shownMsg) shownMsg.value = "1";citMessageDisplay(citGCMessageBox.messageBox, "visible");citGCMessageBox.setHideMessageTimeout();}if (window.addEventListener) {window.addEventListener("unload", function() { citGCMessageBox.hideMessage(); }, false);} else if (window.attachEvent) {window.attachEvent("onunload", function() {citGCMessageBox.hideMessage(); });}}if (window.addEventListener) {window.addEventListener("load", citInitGlobals, false);} else if (window.attachEvent) {window.attachEvent("onload", citInitGlobals);}</script><script>var gs_ie_ver=100;</script><!--[if IE 6]><script>gs_ie_ver=6;</script><![endif]--><!--[if IE 7]><script>gs_ie_ver=7;</script><![endif]--><!--[if IE 8]><script>gs_ie_ver=8;</script><![endif]--><script>function gs_id(i){return document.getElementById(i)}function gs_ch(e,t){return e?e.getElementsByTagName(t):[]}function gs_ech(e){return e.children||e.childNodes}function gs_atr(e,a){return e.getAttribute(a)}function gs_hatr(e,a){var n=e.getAttributeNode(a);return n&&n.specified}function gs_xatr(e,a,v){e.setAttribute(a,v)}function gs_uatr(e,a){e.removeAttribute(a)}function gs_catr(e,a,v){gs_hatr(e,a)&&gs_xatr(e,a,v)}function gs_ctai(e,v){gs_hatr(e,"tabindex")&&(e.tabIndex=v)}function gs_uas(s){return (navigator.userAgent||"").indexOf(s)>=0}var gs_is_tc=/[?&]tc=([01])/.exec(window.location.search||""),gs_is_ios=gs_uas("iPhone")||gs_uas("iPod")||gs_uas("iPad");if(gs_is_tc){gs_is_tc=parseInt(gs_is_tc[1]);}else if(window.matchMedia&&matchMedia("(pointer),(-moz-touch-enabled),(-moz-touch-enabled:0)").matches){gs_is_tc=matchMedia("(pointer:coarse),(-moz-touch-enabled)").matches;}else{gs_is_tc=gs_is_ios||gs_uas("Android")||gs_uas("Windows Phone")||gs_uas("BlackBerry")||(gs_uas("AppleWebKit")&&(gs_uas("Mobile")||gs_uas("Tablet")))||gs_uas("Opera Mini")||gs_uas("Opera Mobi")||gs_uas("IEMobile")||('ontouchstart' in window)||(navigator.msMaxTouchPoints||0)>0;}var gs_re_sp=/\s+/,gs_re_sel=/(?:^|\s)(\S*-)?gs_sel(-\S*)?(?!\S)/g,gs_re_hvr=/(?:^|\s)(\S*-)?gs_hvr(-\S*)?(?!\S)/g,gs_re_fcs=/(?:^|\s)(\S*-)?gs_fcs(-\S*)?(?!\S)/g,gs_re_act=/(?:^|\s)(\S*-)?gs_act(-\S*)?(?!\S)/g,gs_re_dis=/(?:^|\s)(\S*-)?gs_dis(-\S*)?(?!\S)/g,gs_re_vis=/(?:^|\s)(\S*-)?gs_vis(-\S*)?(?!\S)/g,gs_re_bsp=/(?:^|\s)(\S*-)?gs_bsp(-\S*)?(?!\S)/g,gs_re_cb=/(?:^|\s)gs_in_cb(?!\S)/,gs_re_ra=/(?:^|\s)gs_in_ra(?!\S)/;function gs_xcls(e,c){var l=e.className.split(gs_re_sp),n=l.length,i;l.push(c);for(i=0;i<n;i++){l[i]&&l.push(l[i]+"-"+c)}gs_scls(e,l.join(" "));}function gs_ucls(e,r){gs_scls(e,e.className.replace(r,""))}function gs_scls(e,c){return e.className!=c&&(e.className=c,true)}function gs_usel(e){gs_ucls(e,gs_re_sel)}function gs_xsel(e){gs_usel(e);gs_xcls(e,"gs_sel")}function gs_isel(e){(e.className.match(gs_re_sel)?gs_usel:gs_xsel)(e)}function gs_uhvr(e){gs_ucls(e,gs_re_hvr)}function gs_xhvr(e){gs_uhvr(e);gs_xcls(e,"gs_hvr");}function gs_ufcs(e){gs_ucls(e,gs_re_fcs)}function gs_xfcs(e){gs_ufcs(e);gs_xcls(e,"gs_fcs")}function gs_uact(e){gs_ucls(e,gs_re_act)}function gs_xact(e){gs_uact(e);gs_xcls(e,"gs_act")}function gs_udis(e){gs_ucls(e,gs_re_dis)}function gs_xdis(e){gs_udis(e);gs_xcls(e,"gs_dis")}function gs_uvis(e){gs_ucls(e,gs_re_vis)}function gs_xvis(e){gs_uvis(e);gs_xcls(e,"gs_vis")}function gs_ubsp(e){gs_ucls(e,gs_re_bsp)}function gs_xbsp(e){gs_ubsp(e);gs_xcls(e,"gs_bsp")}var gs_gcs=window.getComputedStyle?function(e){return getComputedStyle(e,null)}:function(e){return e.currentStyle};var gs_ctd=function(){var s=document.documentElement.style,p,l=['OT','MozT','webkitT','t'],i=l.length;function f(s){return Math.max.apply(null,(s||"").split(",").map(parseFloat))||0;}do{p=l[--i]+'ransition'}while(i&&!(p in s));return i?function(e){var s=gs_gcs(e);return f(s[p+"Delay"])+f(s[p+"Duration"]);}:function(){return 0};}();function gs_vis(e,v,c){var s=e&&e.style,n="webkitTransitionEnd",h,f;if(s){gs_catr(e,"aria-hidden",v?"false":"true");if(v){s.display=v===2?"inline":"block";gs_ctd(e);gs_xvis(e);h=function(){e.removeEventListener(n,h,false);var t=pageYOffset+e.getBoundingClientRect().bottom,x=gs_id("gs_top");t>x.offsetHeight&&(x.style.minHeight=t+"px");};f=gs_ctd(e);"on"+n.toLowerCase() in window&&f&&e.addEventListener(n,h,false);c&&(f?setTimeout(c,1000*f):c());}else{gs_uvis(e);h=function(){s.display="none";var x=gs_id("gs_top").style;x.minHeight&&(x.minHeight="");c&&c();};f=gs_ctd(e);f?setTimeout(h,1000*f):h();}}}function gs_visi(i,v,c){gs_vis(gs_id(i),v,c)}function gs_sel_clk(p,t){var l=gs_ch(gs_id(p),"li"),i=l.length,c,x,s;while(i--){if((c=gs_ch(x=l[i],"a")).length){s=c[0]===t;(s?gs_xsel:gs_usel)(x);gs_catr(c[0],"aria-selected",s?"true":"false");}}return false;}function gs_efl(f){if(typeof f=="string"){var c=f.charAt(0),x=f.slice(1);if(c==="#")f=function(t){return t.id===x};else if(c===".")f=function(t){return (" "+t.className+" ").indexOf(" "+x+" ")>=0};else{c=f.toLowerCase();f=function(t){return t.nodeName.toLowerCase()===c};}}return f;}function gs_dfcn(d){return (d?"last":"first")+"Child"}function gs_dnsn(d){return (d?"previous":"next")+"Sibling"}var gs_trv=function(){function h(r,x,f,s,n,c){var t,p;while(x){if(x.nodeType===1){if(f(x)){if(c)return x;}else{for(p=x[s];p;p=p[n])if(t=h(p,p,f,s,n,1))return t;}}c=1;while(1){if(x===r)return;p=x.parentNode;if(x=x[n])break;x=p;}}}return function(r,x,f,d){return h(r,x,gs_efl(f),gs_dfcn(d),gs_dnsn(d))};}();function gs_bind(){var a=Array.prototype.slice.call(arguments),f=a.shift();return function(){return f.apply(null,a.concat(Array.prototype.slice.call(arguments)))};}var gs_evt_ie=[],gs_evt1=window.addEventListener?function(e,n,f){e.addEventListener(n,f,false);}:function(e,n,f){n="on"+n;e.attachEvent(n,f);gs_ie_ver<=6&&gs_evt_ie.push(function(){e.detachEvent(n,f)});};function gs_evt(e,n,f){if(typeof n==="string")gs_evt1(e,n,f);else for(var i=n.length;i--;)gs_evt1(e,n[i],f);}function gs_evt_all(l,n,f){for(var i=l.length;i--;){gs_evt(l[i],n,gs_bind(f,l[i]))}}function gs_evt_dlg(p,c,n,f){p!==c&&(c=gs_efl(c));gs_evt(p,n,p===c?function(e){f(p,e)}:function(e){var t=gs_evt_tgt(e);while(t){if(c(t))return f(t,e);if(t===p)return;t=t.parentNode;}});}function gs_evt_sms(v){var L=[],l=["mousedown","click"],i=l.length;function s(e){for(var l=L,n=l.length,i=0,x=e.clientX,y=e.clientY;i<n;i+=2){if(Math.abs(x-l[i])<10&&Math.abs(y-l[i+1])<10){gs_evt_ntr(e);break;}}}while(i--)document.addEventListener(l[i],s,true);gs_evt_sms=function(e){var l=e.changedTouches||[],h=l[0]||{};L.push(h.clientX,h.clientY);setTimeout(function(){L.splice(0,2)},2000);};gs_evt_sms(v);v=0;}function gs_evt_clk(e,f,w,k){return gs_evt_dlg_clk(e,e,function(t,e){f(e)},w,k);}function gs_evt_dlg_clk(p,c,f,w,k){k=","+(k||[13,32]).join(",")+",";return gs_evt_dlg_xclk(p,c,function(t,e){if(e.type=="keydown"){if(k.indexOf(","+e.keyCode+",")<0)return;gs_evt_ntr(e);}f(t,e);},w);}var gs_evt_cl=["touchstart","touchend","touchcancel","mousedown","keydown","keyup","click"];function gs_evt_xclk(e,f,w){return gs_evt_dlg_xclk(e,e,function(t,e){f(e)},w);}function gs_evt_dlg_xclk(p,c,f,w){var T,S=0,X=0,Y=0,O=0,V=0;function u(t,e){var n=e.type,h,l;if(t!==T){T=t;S=0;}if(!gs_evt_spk(e)){if(n==="mousedown"){if(w!==2)return S=0;S=1;}else if(n==="click"){if(S){gs_evt_ntr(e);return S=0;}}else if(n==="touchstart"&&w){if(e.timeStamp-V<200){gs_evt_ntr(e);return S=0;}if(w===2){S=0;}else{if((l=e.touches).length!==1)return S=-3;h=l[0];X=h.pageX;Y=h.pageY;O=pageYOffset;return S=3;}}else if(n==="touchcancel"){return S=0;}else if(n==="touchend"&&w){gs_evt_sms(e);V=e.timeStamp;if(w===2){gs_evt_ntr(e);return S=0;}if(S!==3||(l=e.changedTouches).length!==1||Math.abs(X-(h=l[0]).pageX)>10||Math.abs(Y-h.pageY)>10||Math.abs(O-pageYOffset)>1){return S=(e.touches.length?-4:0);}S=0;}else if(n==="keydown"){f(t,e);return;}else if(n==="keyup"){e.keyCode===32&&gs_evt_pdf(e);return;}else{return}gs_evt_ntr(e);f(t,e);}}gs_evt_dlg(p,c,w?gs_evt_cl:["click","keydown","keyup"],u);return u;}function gs_evt_inp(e,f){gs_evt(e,["input","keyup","cut","paste","change"],function(){setTimeout(f,0)});}function gs_evt_fcs(e,f){e.addEventListener("focus",f,true)}function gs_evt_blr(e,f){e.addEventListener("blur",f,true)}if("onfocusin" in document){gs_evt_fcs=function(e,f){gs_evt(e,"focusin",f)};gs_evt_blr=function(e,f){gs_evt(e,"focusout",f)};}function gs_evt_stp(e){e.cancelBubble=true;e.stopPropagation&&e.stopPropagation();return false;}function gs_evt_pdf(e){e.returnValue=false;e.preventDefault&&e.preventDefault();}function gs_evt_ntr(e){gs_evt_stp(e);gs_evt_pdf(e);}function gs_evt_tgt(e){var t=e.target||e.srcElement;t&&t.nodeType===3&&(t=t.parentNode);return t;}function gs_evt_spk(e){return e.ctrlKey||e.altKey||e.metaKey||e.shiftKey}function gs_tfcs(t){if(!gs_is_tc||(gs_uas("Windows")&&!gs_uas("IEMobile"))){t.focus();t.value=t.value;}}var gs_raf=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(c){setTimeout(c,33)};var gs_evt_rdy=function(){var d=document,l=[],h=function(){var n=l.length,i=0;while(i<n)l[i++]();l=[];};gs_evt(d,"DOMContentLoaded",h);gs_evt(d,"readystatechange",function(){var s=d.readyState;(s=="complete"||(s=="interactive"&&gs_id("gs_rdy")))&&h();});gs_evt(window,"load",h);return function(f){l.push(f)};}();function gs_evt_raf(e,n){var l=[],t=0,h=function(){var x=l,n=x.length,i=0;while(i<n)x[i++]();t=0;};return function(f){l.length||gs_evt(e,n,function(){!t++&&gs_raf(h)});l.push(f);};}var gs_evt_wsc=gs_evt_raf(window,"scroll"),gs_evt_wre=gs_evt_raf(window,"resize");var gs_md_st=[],gs_md_lv={},gs_md_fc={},gs_md_if,gs_md_is=0;function gs_md_ifc(d,f){gs_md_fc[d]=f}function gs_md_sif(){gs_md_if=1;setTimeout(function(){gs_md_if=0},0);}function gs_md_plv(n){var l=gs_md_lv,x=0;while(n&&!x){x=l[n.id]||0;n=n.parentNode;}return x;}gs_evt(document,"click",function(e){var m=gs_md_st.length;if(m&&!gs_evt_spk(e)&&m>gs_md_plv(gs_evt_tgt(e))){(gs_md_st.pop())();gs_evt_pdf(e);}});gs_evt(document,"keydown",function(e){e.keyCode==27&&!gs_evt_spk(e)&&gs_md_st.length&&(gs_md_st.pop())();});gs_evt(document,"selectstart",function(e){gs_md_is&&gs_evt_pdf(e)});gs_evt_fcs(document,function(e){var l=gs_md_lv,m=gs_md_st.length,x,k,v,d;if(m&&!gs_md_if){x=gs_md_plv(gs_evt_tgt(e));while(x<m){v=0;for(k in l)l.hasOwnProperty(k)&&l[k]>v&&(v=l[d=k]);if(v=gs_md_fc[d]){gs_evt_stp(e);gs_id(v).focus();break;}else{(gs_md_st.pop())(1);--m;!gs_md_is++&&setTimeout(function(){gs_md_is=0},1000);}}}});function gs_md_cls(d,e){var x=gs_md_lv[d]||1e6;while(gs_md_st.length>=x)(gs_md_st.pop())();return gs_evt_stp(e);}function gs_md_opn(d,e,c,z){if(!gs_md_lv[d]){var n=gs_id(d),x=gs_md_plv(n),a=document.activeElement;while(gs_md_st.length>x)(gs_md_st.pop())();gs_visi(d,1);gs_md_st.push(function(u){gs_md_lv[d]=0;gs_visi(d,0,z);try{u||a.focus()}catch(_){}c&&c(u);});gs_md_lv[d]=gs_md_st.length;return gs_evt_stp(e);}}function gs_evt_md_mnu(d,b,f,a,w){var O,X;d=gs_id(d);b=gs_id(b);f=f?gs_efl(f):function(t){return (gs_hatr(t,"data-a")||t.nodeName==="A"&&t.href)&&t.offsetWidth;};a=a||function(t){var c=gs_atr(t,"data-a");c?eval(c):t.nodeName==="A"&&t.href&&(location=t.href);};function u(e){if(e.type=="keydown"){var k=e.keyCode;if(k==38||k==40){if(O){try{gs_trv(d,d,f,k==38).focus()}catch(_){}gs_evt_ntr(e);return;}}else if(k!=13&&k!=32){return;}gs_evt_pdf(e);}if(O){gs_md_cls(d.id,e);}else{gs_md_sif();O=1;gs_xsel(b);gs_md_opn(d.id,e,function(){O=0;gs_usel(b);try{gs_ufcs(X);X.blur()}catch(_){}});w&&w();}}function c(x,r){var p=x.parentNode,c=gs_ech(p),i=c.length,l="offsetLeft";if(p!==d){while(c[--i]!==x);p=p[gs_dnsn(r)]||p.parentNode[gs_dfcn(r)];c=gs_ech(p);if(i=Math.min(i+1,c.length)){p=c[i-1];if(p.nodeType==1&&f(p)&&p[l]!=x[l])return p;}}}function g(t,e){function m(x){if(x){gs_evt_ntr(e);x.focus();}}if(O){if(e.type=="keydown"){var k=e.keyCode;if(k==13||k==32){}else{if(k==38||k==40){m(gs_trv(d,t,f,k==38)||gs_trv(d,d,f,k==38));}else if(k==37||k==39){m(c(t,k==37));}return;}}gs_md_cls(d.id,e);gs_evt_pdf(e);gs_md_sif();a(t);}}gs_evt_xclk(b,u,2);gs_evt_fcs(d,function(e){var x=gs_evt_tgt(e);if(x&&f(x)){gs_ctai(x,0);gs_xfcs(x);X=x;}});gs_evt_blr(d,function(e){var x=gs_evt_tgt(e);if(x&&f(x)){gs_ctai(x,-1);gs_ufcs(x);X=0;}});gs_evt_dlg_xclk(d,f,g,1);return u;}function gs_evt_dlg_md_mnu(p,d,b,f,a,w){var r={};gs_evt_dlg(p,function(t){return d(t.id)},gs_evt_cl,function(t,e){var x=t.id;r[x]=r[x]||gs_evt_md_mnu(d(x),x,f,a,w)(e)||1;});}function gs_evt_md_sel(d,b,h,c,s,u){h=gs_id(h);c=gs_id(c);s=gs_id(s);return gs_evt_md_mnu(d,b,function(t){return gs_hatr(t,"data-v")},function(t){h.innerHTML=t.innerHTML;c.value=gs_atr(t,"data-v");if(t!==s){gs_usel(s);gs_uatr(s,"aria-selected");gs_xsel(s=t);gs_xatr(s,"aria-selected","true");}u&&u();},function(){s.focus()});}function gs_xhr(){if(window.XMLHttpRequest)return new XMLHttpRequest();var c=["Microsoft.XMLHTTP","MSXML2.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP.6.0"],i=c.length;while(i--)try{return new ActiveXObject(c[i])}catch(e){}}function gs_ajax(u,d,c){var r=gs_xhr();r.onreadystatechange=function(){r.readyState==4&&c(r.status,r.responseText);};r.open(d?"POST":"GET",u,true);d&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d?r.send(d):r.send();}var gs_lst,gs_xlst;if(window.localStorage){gs_lst=function(k){return localStorage[k]};gs_xlst=function(k,v){localStorage[k]=v};}else if(gs_ie_ver<8)!function(){var c;function l(){if(c)return c;c=document.createElement("div");c.style.display="none";c.style.behavior="url('#default#userdata')";document.body.appendChild(c);return c;}gs_lst=function(k){l().load("s");return gs_atr(l(),k)};gs_xlst=function(k,v){gs_xatr(l(),k,v);l().save("s")};}();var gs_evt_el=function(W,D,L){function p(){var r=D.documentElement,w=W.innerWidth||r.offsetWidth,h=W.innerHeight||r.offsetHeight,m="",n,i;if(w&&h){if(w<600)m="gs_el_sm gs_el_ph";else if(w<982)m="gs_el_sm gs_el_ta";else if(w<1060||h<590)m="gs_el_sm";else if(w<1252||h<640)m="gs_el_me";gs_is_tc&&gs_ie_ver>=8&&(m+=" gs_el_tc");gs_is_ios&&(m+=" gs_el_ios");if(gs_scls(r,m))for(n=L.length,i=0;i<n;)L[i++]();}}p();gs_evt_wre(p);gs_evt(W,["pageshow","load"],p);return function(f){f();L.push(f)};}(window,document,[]);gs_is_ios&&gs_uas("AppleWebKit")&&!gs_uas("CriOS")&&(gs_uas("OS 4_")||gs_uas("OS 5_"))&&(function(){var t=0,v=document.querySelector("meta[name=viewport]");v&&gs_evt(window,"devicemotion",function(e){var a=e.accelerationIncludingGravity,x=Math.abs(a.x),y=Math.abs(a.y),m=x>1&&x>1.3*y&&!(window.orientation%180);m!==t&&gs_xatr(v,'content','width=device-width,initial-scale=1,minimum-scale=1,maximum-scale='+(m?1:2));t=m;});})();function gs_is_cb(e){var n=e.className||"";return n.match(gs_re_cb)||n.match(gs_re_ra);}function gs_ssel(e){}(function(d){function c(){var v=l,i=v.length,k=p,e,x=gs_id("gs_top");if(x&&!r){gs_evt(x,"click",function(){});r=1;if(!s){clearInterval(t);t=null}}p=i;while(i-->k)gs_is_cb((e=v[i]).parentNode)&&gs_ssel(e);}var s=gs_ie_ver<=8,l=[],p=0,t=setInterval(c,200),r;gs_evt_rdy(function(){c();l=[];clearInterval(t)});if(!s&&gs_is_tc){s=/AppleWebKit\/([0-9]+)/.exec(navigator.userAgent||"");s=s&&parseInt(s[1])<535;}if(!s)return;l=gs_ch(d,"input");gs_ssel=function(e){var p=e.parentNode,l,i,r;(e.checked?gs_xsel:gs_usel)(p);if(p.className.match(gs_re_ra)){l=e.form.elements[e.name]||[];for(i=l.length;i--;)((r=l[i]).checked?gs_xsel:gs_usel)(r.parentNode);}};gs_evt(d,"click",function(e){var x=gs_evt_tgt(e),p=x.parentNode;gs_is_cb(p)&&x.nodeName==="INPUT"&&gs_ssel(x);});if(gs_ie_ver>7)return;function w(t){var n=t&&t.nodeName;while(n==="SPAN"||n==="B"||n==="I")n=(t=t.parentNode).nodeName;return t;}var A;function y(f,e){var t=w(e.srcElement),n=t&&t.nodeName,p;if(n==="INPUT"||n==="BUTTON"||n==="LABEL"){p=t.parentNode;f(gs_is_cb(p)?p:t);}}gs_evt(d,"mousedown",gs_bind(y,function(t){gs_xact(A=t)}));gs_evt(d,"mouseup",function(){A&&(gs_uact(A),A=0)});gs_evt(d,"focusin",gs_bind(y,gs_xfcs));gs_evt(d,"focusout",gs_bind(y,gs_ufcs));if(gs_ie_ver>6)return;gs_evt(window,"unload",function(){var l=gs_evt_ie,i=l.length;while(i--){(l[i])()}l.length=0;});gs_evt(window,"load",function(){try{document.execCommand("BackgroundImageCache",false,true)}catch(_){}});function h(t){var n=(t=w(t))&&t.nodeName,p;return n==="BUTTON"||n==="LI"?t:(n==="INPUT"||n==="LABEL")&&(gs_is_cb(p=t.parentNode)?p:t);}gs_evt(d,"mouseover",function(e){var f=h(e.fromElement),t=h(e.srcElement);t&&t!==f&&gs_xhvr(t);});gs_evt(d,"mouseout",function(e){var f=h(e.srcElement),t=h(e.toElement);f&&f!==t&&gs_uhvr(f);});function a(t){var n=(t=w(t))&&t.nodeName;return n==="BUTTON"&&t.type==="submit"&&t;}function k(f,b){var l=gs_ch(f,"button"),i=l.length,r=[],x;while(i--)(x=l[i]).type==="submit"&&r.push(x);if((i=r.length)>1){while(i--)(x=r[i])!==b&&(x.disabled=true);f.submit();}}gs_evt(d,"keydown",function(e){var v=e.srcElement,f,b;if(e.keyCode===13&&!gs_evt_spk(e)){for(f=v;f&&f.nodeName!=="FORM";f=f.parentNode);f&&((b=a(v))||v.nodeName==="INPUT"&&v.type==="text"?k(f,b):gs_evt_pdf(e));}});gs_evt(d,"click",function(e){var f,b;!gs_evt_spk(e)&&(b=a(e.srcElement))&&(f=b.form)&&k(f,b);});})(document);</script><script type="text/javascript"></script></head><body><style>#gs_gb{position:relative;height:30px;background:#2d2d2d;z-index:950;font-size:13px;line-height:16px;-webkit-backface-visibility:hidden;}#gs_gb_lt,#gs_gb_rt,#gs_gb_lp{position:absolute;top:0;white-space:nowrap;}#gs_gb_lt{left:34px}.gs_el_me #gs_gb_lt{left:18px}.gs_el_sm #gs_gb_lt{left:6px}.gs_el_ph #gs_gb_lt{display:none}#gs_gb_lp{display:none}#gs_gb_lp:hover,#gs_gb_lp:focus,#gs_gb_lp:active{-webkit-filter:brightness(100%);}.gs_el_ph #gs_gb_lp{display:block;z-index:1;cursor:pointer;top:8px;left:8px;width:50px;height:17px;background:url('/intl/en/scholar/images/google_logo_tg_2012.png');_background:transparent;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/intl/en/scholar/images/google_logo_tg_2012.png');}#gs_gb_rt{right:36px}.gs_el_me #gs_gb_rt{right:18px}.gs_el_sm #gs_gb_rt{right:6px}.gs_el_ta #gs_gb_rt,.gs_el_ph #gs_gb_rt{right:0}#gs_gb_lt a:link,#gs_gb_lt a:visited,#gs_gb_rt a:link,#gs_gb_rt a:visited{display:inline-block;vertical-align:top;height:29px;line-height:27px;padding:2px 10px 0 10px;font-weight:bold;color:#bbb;cursor:pointer;text-decoration:none;}#gs_gb_rt a:link,#gs_gb_rt a:visited{padding:2px 8px 0 8px}#gs_gb_lt a:hover,#gs_gb_lt a:focus,#gs_gb_lt a:active,#gs_gb_rt a:hover,#gs_gb_rt a:focus,#gs_gb_rt a:active{color:white;outline:none;}#gs_gb_ac{top:30px;left:auto;right:6px;width:288px;white-space:normal;}#gs_gb_aw,#gs_gb_ap,.gs_gb_am,#gs_gb_ab{display:block;padding:10px 20px;}#gs_gb_aw{background:#fef9db;font-size:11px;}#gs_gb_ap,.gs_gb_am{border-bottom:1px solid #ccc;}#gs_gb_aa:link,#gs_gb_aa:visited{padding:7px 0 5px 0;float:right;margin-left:8px;color:#1155cc;}#gs_gb_aa:active{color:#d14836}.gs_gb_am:link,.gs_gb_am:visited{color:#222;text-decoration:none;}.gs_gb_am:hover,.gs_gb_am:focus{background:#f1f1f1}.gs_gb_am:active{background:#eee}#gs_gb_ab{background:#fbfbfb;overflow:auto;zoom:1;}#gs_gb_aab{float:left;margin-right:16px}#gs_gb_aso{float:right}</style><div id="gs_gb" role="navigation"><div id="gs_gb_lt"><a href="http://www.google.com/webhp?hl=en&amp;">Web</a><a href="http://www.google.com/imghp?hl=en&amp;">Images</a><a href="http://www.google.com/intl/en/options/">More&hellip;</a></div><a id="gs_gb_lp" aria-label="Web" href="http://www.google.com/webhp?hl=en&"></a><div id="gs_gb_rt"><a href="https://accounts.google.com/Login?hl=en&amp;continue=http://scholar.google.com/citations%3Fview_op%3Dview_citation%26hl%3Den%26user%3D6WjiSOwAAAAJ%26citation_for_view%3D6WjiSOwAAAAJ:qjMakFHDy7sC">Sign in</a></div></div><div id="gs_top"><div class="g-doc-1024"><div class="g-section g-tpl-250-alt"><div class="g-unit g-first"><div style="padding-left:1em"><a href="http://scholar.google.com/schhp?hl=en&amp;oe=ASCII" target="_top"><img src="http://scholar.google.com/intl/en/scholar/images/scholar_logo_md_2011.gif" width="194" height="40" alt="Scholar Home" border=0></a><form method="get" action="/citations"><input type=hidden name=hl value="en"><input type=hidden name=oe value="ASCII"><input type="hidden" name="view_op" value="search_authors"><input type="text" name="mauthors" style="width:100%"><br><input type="submit" value="Search Authors"></form><br><div style="font-size:120%"><a href="/citations?hl=en&amp;oe=ASCII" class="cit-dark-link" target="_top">Get my own profile</a> - <a class="cit-dark-link" href="/intl/en/scholar/citations.html">Help</a></div><br></div></div><div class="g-unit"><div class="cit-user-info"><div class="g-section g-tpl-100"><div class="g-unit g-first"><div style="text-align: center;"><a href="/citations?user=6WjiSOwAAAAJ&amp;hl=en&amp;oe=ASCII"><img width="96" height="96" src="/citations/images/green_ghost.jpg"></a><br><a class="cit-inplaceaction" href="javascript:void(0)" onclick="citTogglePhotoForm();"></a></div></div><div class="g-unit"><div style="margin-left:6px"><form id="cit-name-form" method="post" class="cit-inplaceform" action=""><span id="cit-name-read"><span id="cit-name-display" class="cit-in-place-nohover">Soumya Ray</span></span></form><form id="cit-affiliation-form" method="post" class="cit-inplaceform" action=""><span id="cit-affiliation-read"><span id="cit-affiliation-display" class="cit-in-place-nohover">Assistant Professor, Institute of Service Science, National Tsing Hua University</span></span></form><form id="cit-int-form" method="post" class="cit-inplaceform" action=""><span id="cit-int-read"><span id="cit-int-display" class="cit-in-place-nohover" >Unknown interests</span></span></form><form id="cit-domain-form" method="post" class="cit-inplaceform" action=""><span id="cit-domain-read"><span id="cit-domain-display" class="cit-in-place-nohover">Verified email at mx.nthu.edu.tw</span></span></form><form id="cit-homepage-form" method="post" class="cit-inplaceform" style="display:inline" action=""><span id="cit-homepage-read"><a class="cit-dark-large-link" href="http://soumyaray.com/" rel="nofollow" target="_blank">Homepage</a></span></form></div></div></div></div></div></div><div class="g-section"><div class="cit-messagebox" id="message_box" style="visibility:hidden"><table style="display:inline-table"><tr><td><b></b><i></i><form style="display:none"><input type="hidden" id="cit-show-msg" value=""><input type="text" id="cit-shown-msg" value=""></form><form action="" method="post" name="undoFrm"><input type="hidden" name="" value=""/><div id="message_text">&nbsp;</div></form><i></i><b></b></td></tr></table></div></div><div class="g-section"><table class="cit-bodytable"><tr><td class="cit-contentcell"><div class="cit-body"><b></b><i></i><form method="post" action="/citations?hl=en&amp;oe=ASCII&amp;user=6WjiSOwAAAAJ&amp;citation_for_view=6WjiSOwAAAAJ:qjMakFHDy7sC&amp;view_op=view_citation" id="citationsForm"><input type="hidden" name="xsrf" value="AMstHGQAAAAAU8i6fcswBh-QdBCMz3AikOmibdX5lqlo"/><input type="hidden" name="s" value="6WjiSOwAAAAJ:qjMakFHDy7sC"><div class="g-section cit-dgb"><div style="padding:0.3em 0.6em;"><table style="width:100%"><tr><td><a href="/citations?user=6WjiSOwAAAAJ&amp;hl=en&amp;oe=ASCII" class="cit-dark-link">&laquo; Back to list</a>&nbsp;&nbsp;<input type="submit" value="Export" id="export_btn_top" name="export_btn"> </td><td style="text-align:right;"></td></tr></table></div></div><div style="border-left:0.4em solid #9fd9a7;"><div class="g-section"><div style="padding: 0.5em 0 0 0"><div class="g-section cit-fieldbox" id="main_sec"><u></u><i></i><div style="float:right;padding:8px;font-size:120%;"><a class="cit-bg-link" href="http://meta.lib.ncu.edu.tw:9003/sfx_nthu?sid=google&amp;auinit=S&amp;aulast=Ray&amp;atitle=The+Central+Role+of+Engagement+in+Online+Communities&amp;id=doi:10.1287/isre.2014.0525" >Findit@NTHU</a></div><div class="cit-dl"><div class="cit-dt">Title</div><div class="cit-dd"><div id="title"><a style="text-decoration:none" href="http://pubsonline.informs.org/doi/abs/10.1287/isre.2014.0525" >The Central Role of Engagement in Online Communities</a></div></div><div class="g-section"><div class="cit-dt">Authors</div><div class="cit-dd"> Soumya Ray, Sung S Kim, James G Morris</div></div><div class="g-section" id="pubdate_sec"><div class="cit-dt">Publication date</div><div class="cit-dd">2014/7/1</div></div><div class="g-section" id="venue_sec"><div class="cit-dt">Journal name</div><div class="cit-dd">Information Systems Research</div></div><div class="g-section" id="publisher_sec"><div class="cit-dt">Publisher</div><div class="cit-dd">INFORMS</div></div><div class="g-section" id="description_sec"><div class="cit-dt">Description</div><div class="cit-dd">Online communities are new social structures dependent on modern information technology, <br>and they face equally modern challenges. Although satisfied members regularly consume <br>content, it is considerably harder to coax them to contribute new content and help recruit <br>others because they face unprecedented social comparison and criticism. We propose that <br>engagement-a concept only abstractly alluded to in information systems research-is the key <br>to active participation in these unique sociotechnical environments. We constructed and <strong> ...</strong></div></div></div><i></i><u></u></div><div class="g-section cit-fieldbox"><u></u><i></i><div class="cit-dl"><div class="g-section"><div class="cit-dt">Scholar articles</div><div class="cit-dd"><a href="http://scholar.google.com/scholar?oi=bibs&amp;hl=en&amp;oe=ASCII&amp;cluster=18260291687290566625&amp;btnI=Lucky" class="cit-dark-link" >The Central Role of Engagement in Online Communities</a><br>S Ray, SS Kim, JG Morris - Information Systems Research, 2014<br></div></div></div><i></i><u></u></div></div></div></div><div class="g-section cit-dgb"><div style="padding:0.3em 0.6em;"><table style="width:100%"><tr><td><a href="/citations?user=6WjiSOwAAAAJ&amp;hl=en&amp;oe=ASCII" class="cit-dark-link">&laquo; Back to list</a>&nbsp;&nbsp;<input type="submit" value="Export" id="export_btn_bottom" name="export_btn"> </td><td style="text-align:right;"></td></tr></table></div></div></form><i></i><b></b></div></td></tr></table></div><div class="g-section"><div style="margin-top: 1em; text-align: center; font-size: 1em;"><div style="margin-bottom: 1em;font-style: italic">Dates and citation counts are estimated and are determined automatically by a computer program.</div>&copy;2013 Google - <a href="/intl/en/scholar/about.html" class="cit-dark-link" target="_top">About Google Scholar</a> - <a href="http://www.google.com/intl/en/about.html" class="cit-dark-link" target="_top">All About Google</a> - <a href="http://www.google.com/support/scholar/bin/request.py?contact_type=general" class="cit-dark-link" target="_top">Provide feedback</a> - <a href="/citations?hl=en&amp;oe=ASCII" class="cit-dark-link" target="_top">My Citations</a></div></div></div></div></body></html>
@@ -1,3 +1,5 @@
1
1
  require './lib/gentle-scholar.rb'
2
+ require 'nokogiri'
2
3
 
3
- SEC_PAPER = GentleScholar::Publication.get_from_http('6WjiSOwAAAAJ:u5HHmVD_uO8C')
4
+ SEC_RESULTS = GentleScholar::Publication.get_from_http('6WjiSOwAAAAJ:u5HHmVD_uO8C')
5
+ UNPUB_PAPER = File.read('./spec/docs/unpub_doc.txt')
@@ -15,7 +15,7 @@ describe 'Publication', 'A single publication listing' do
15
15
  # end
16
16
 
17
17
  before do
18
- @sec_paper = SEC_PAPER
18
+ @sec_paper = SEC_RESULTS
19
19
  end
20
20
 
21
21
  it 'has the right title' do
@@ -28,15 +28,15 @@ describe 'Publication', 'A single publication listing' do
28
28
  end
29
29
 
30
30
  it 'has some url for listing cites' do
31
- @sec_paper[:cites_url].must_match /http:\/\/.*/
31
+ @sec_paper[:cites_url].must_match %r|http://.*|
32
32
  end
33
33
 
34
34
  it 'has some url for citations chart' do
35
- @sec_paper[:chart_url].must_match /http:\/\/.*/
35
+ @sec_paper[:chart_url].must_match %r|http://.*|
36
36
  end
37
37
 
38
- it 'has some url for the pulished article' do
39
- @sec_paper[:article_url].must_match /http:\/\/.*/
38
+ it 'has some url for the published article' do
39
+ @sec_paper[:article_url].must_match %r|http://.*|
40
40
  end
41
41
 
42
42
  it 'has the right author(s) (as nested array)' do
@@ -68,9 +68,33 @@ describe 'Publication', 'A single publication listing' do
68
68
  end
69
69
 
70
70
  it 'has some url for the main citations apage' do
71
- @sec_paper[:gscholar_url].must_match /citations/
71
+ @sec_paper[:gscholar_url].must_match(/citations/)
72
72
  end
73
73
 
74
74
  end
75
75
 
76
+ describe 'when it is an unpublished paper (missing attributes)' do
77
+ before do
78
+ doc = Nokogiri::HTML(UNPUB_PAPER)
79
+ @unpub_paper = GentleScholar::Publication.extract_from_document(doc)
80
+ end
81
+
82
+ it 'has the right basic information' do
83
+ @unpub_paper[:title].must_equal 'The Central Role of Engagement in Online Communities'
84
+ @unpub_paper[:article_url].must_match(%r|http://.*|)
85
+ @unpub_paper[:gscholar_url].must_match(/citations/)
86
+ @unpub_paper[:authors].must_equal [['Soumya', 'Ray'], ['Sung', 'S', 'Kim'], ['James', 'G', 'Morris']]
87
+ @unpub_paper[:date].must_be_instance_of Date
88
+ @unpub_paper[:journal].must_equal 'Information Systems Research'
89
+ @unpub_paper[:publisher].must_equal 'INFORMS'
90
+ end
91
+
92
+ it 'must not produce error for non-existing information' do
93
+ @unpub_paper[:volume].must_be_nil
94
+ @unpub_paper[:issue].must_be_nil
95
+ @unpub_paper[:pages].must_be_nil
96
+ @unpub_paper[:chart_url].must_be_nil
97
+ end
98
+ end
99
+
76
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gentle-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soumya Ray
@@ -82,6 +82,7 @@ files:
82
82
  - lib/gentle-scholar.rb
83
83
  - lib/gentle-scholar/publication.rb
84
84
  - lib/gentle-scholar/version.rb
85
+ - spec/docs/unpub_doc.txt
85
86
  - spec/minitest_helper.rb
86
87
  - spec/publication_spec.rb
87
88
  homepage: https://github.com/soumyaray/gentle-scholar
@@ -104,10 +105,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  version: '0'
105
106
  requirements: []
106
107
  rubyforge_project:
107
- rubygems_version: 2.1.11
108
+ rubygems_version: 2.2.2
108
109
  signing_key:
109
110
  specification_version: 4
110
111
  summary: Google Scholar infor extractor
111
112
  test_files:
113
+ - spec/docs/unpub_doc.txt
112
114
  - spec/minitest_helper.rb
113
115
  - spec/publication_spec.rb
116
+ has_rdoc: