How do I include selectors in a theme for RStudio? - themes

I have modified this cobalt2 .tmTheme and installed it for RStudio. I want to use some of the more granular features available for the .rsTheme format. When I go into the .rsTheme file generated by RStudio, I see many of the selectors described on this site, along with a number of additional selectors (complete list below), each followed by 1 or more declarations. I've figured out that these are CSS selectors.
.ace_active_debug_line
.ace_active-line
.ace_bracket
.ace_comment
.ace_console_error
.ace_constant
.ace_constant.ace_language
.ace_constant.ace_numeric
.ace_cursor
.ace_editor
.ace_editor.ace_autocomplete
.ace_editor_theme
.ace_find_line
.ace_fold
.ace_foreign_line
.ace_gutter
.ace_gutter-active-line
.ace_invisible
.ace_keyword
.ace_keyword.ace_operator
.ace_layer
.ace_layer.ace_marker-layer
.ace_layer.ace_print-margin-layer
.ace_line
.ace_line-hover
.ace_marker-layer
.ace_markup.ace_heading
.ace_meta.ace_tag
.ace_print-margin
.ace_selected-word
.ace_selection
.ace_selection.ace_start
.ace_step
.ace_string
.ace_support.ace_function
.ace_support.ace_type
.ace_variable
.nocolor.ace_editor
.profvis-flamegraph
.rstudio-themes-flat
.rstudio-themes-flat.ace_editor_theme
.rstudio-themes-flat.editor_dark.ace_editor_theme
.rstudio-themes-flat.rstudio-themes-dark-menus
.terminal
.terminal.focus
.terminal.focus.xterm-cursor-style-bar
.terminal.xterm-cursor-style-block.focus
.terminal-cursor
.xtermBgColor0
.xtermBgColor1
.xtermBgColor10
.xtermBgColor100
.xtermBgColor101
.xtermBgColor102
.xtermBgColor103
.xtermBgColor104
.xtermBgColor105
.xtermBgColor106
.xtermBgColor107
.xtermBgColor108
.xtermBgColor109
.xtermBgColor11
.xtermBgColor110
.xtermBgColor111
.xtermBgColor112
.xtermBgColor113
.xtermBgColor114
.xtermBgColor115
.xtermBgColor116
.xtermBgColor117
.xtermBgColor118
.xtermBgColor119
.xtermBgColor12
.xtermBgColor120
.xtermBgColor121
.xtermBgColor122
.xtermBgColor123
.xtermBgColor124
.xtermBgColor125
.xtermBgColor126
.xtermBgColor127
.xtermBgColor128
.xtermBgColor129
.xtermBgColor13
.xtermBgColor130
.xtermBgColor131
.xtermBgColor132
.xtermBgColor133
.xtermBgColor134
.xtermBgColor135
.xtermBgColor136
.xtermBgColor137
.xtermBgColor138
.xtermBgColor139
.xtermBgColor14
.xtermBgColor140
.xtermBgColor141
.xtermBgColor142
.xtermBgColor143
.xtermBgColor144
.xtermBgColor145
.xtermBgColor146
.xtermBgColor147
.xtermBgColor148
.xtermBgColor149
.xtermBgColor15
.xtermBgColor150
.xtermBgColor151
.xtermBgColor152
.xtermBgColor153
.xtermBgColor154
.xtermBgColor155
.xtermBgColor156
.xtermBgColor157
.xtermBgColor158
.xtermBgColor159
.xtermBgColor16
.xtermBgColor160
.xtermBgColor161
.xtermBgColor162
.xtermBgColor163
.xtermBgColor164
.xtermBgColor165
.xtermBgColor166
.xtermBgColor167
.xtermBgColor168
.xtermBgColor169
.xtermBgColor17
.xtermBgColor170
.xtermBgColor171
.xtermBgColor172
.xtermBgColor173
.xtermBgColor174
.xtermBgColor175
.xtermBgColor176
.xtermBgColor177
.xtermBgColor178
.xtermBgColor179
.xtermBgColor18
.xtermBgColor180
.xtermBgColor181
.xtermBgColor182
.xtermBgColor183
.xtermBgColor184
.xtermBgColor185
.xtermBgColor186
.xtermBgColor187
.xtermBgColor188
.xtermBgColor189
.xtermBgColor19
.xtermBgColor190
.xtermBgColor191
.xtermBgColor192
.xtermBgColor193
.xtermBgColor194
.xtermBgColor195
.xtermBgColor196
.xtermBgColor197
.xtermBgColor198
.xtermBgColor199
.xtermBgColor2
.xtermBgColor20
.xtermBgColor200
.xtermBgColor201
.xtermBgColor202
.xtermBgColor203
.xtermBgColor204
.xtermBgColor205
.xtermBgColor206
.xtermBgColor207
.xtermBgColor208
.xtermBgColor209
.xtermBgColor21
.xtermBgColor210
.xtermBgColor211
.xtermBgColor212
.xtermBgColor213
.xtermBgColor214
.xtermBgColor215
.xtermBgColor216
.xtermBgColor217
.xtermBgColor218
.xtermBgColor219
.xtermBgColor22
.xtermBgColor220
.xtermBgColor221
.xtermBgColor222
.xtermBgColor223
.xtermBgColor224
.xtermBgColor225
.xtermBgColor226
.xtermBgColor227
.xtermBgColor228
.xtermBgColor229
.xtermBgColor23
.xtermBgColor230
.xtermBgColor231
.xtermBgColor232
.xtermBgColor233
.xtermBgColor234
.xtermBgColor235
.xtermBgColor236
.xtermBgColor237
.xtermBgColor238
.xtermBgColor239
.xtermBgColor24
.xtermBgColor240
.xtermBgColor241
.xtermBgColor242
.xtermBgColor243
.xtermBgColor244
.xtermBgColor245
.xtermBgColor246
.xtermBgColor247
.xtermBgColor248
.xtermBgColor249
.xtermBgColor25
.xtermBgColor250
.xtermBgColor251
.xtermBgColor252
.xtermBgColor253
.xtermBgColor254
.xtermBgColor255
.xtermBgColor26
.xtermBgColor27
.xtermBgColor28
.xtermBgColor29
.xtermBgColor3
.xtermBgColor30
.xtermBgColor31
.xtermBgColor32
.xtermBgColor33
.xtermBgColor34
.xtermBgColor35
.xtermBgColor36
.xtermBgColor37
.xtermBgColor38
.xtermBgColor39
.xtermBgColor4
.xtermBgColor40
.xtermBgColor41
.xtermBgColor42
.xtermBgColor43
.xtermBgColor44
.xtermBgColor45
.xtermBgColor46
.xtermBgColor47
.xtermBgColor48
.xtermBgColor49
.xtermBgColor5
.xtermBgColor50
.xtermBgColor51
.xtermBgColor52
.xtermBgColor53
.xtermBgColor54
.xtermBgColor55
.xtermBgColor56
.xtermBgColor57
.xtermBgColor58
.xtermBgColor59
.xtermBgColor6
.xtermBgColor60
.xtermBgColor61
.xtermBgColor62
.xtermBgColor63
.xtermBgColor64
.xtermBgColor65
.xtermBgColor66
.xtermBgColor67
.xtermBgColor68
.xtermBgColor69
.xtermBgColor7
.xtermBgColor70
.xtermBgColor71
.xtermBgColor72
.xtermBgColor73
.xtermBgColor74
.xtermBgColor75
.xtermBgColor76
.xtermBgColor77
.xtermBgColor78
.xtermBgColor79
.xtermBgColor8
.xtermBgColor80
.xtermBgColor81
.xtermBgColor82
.xtermBgColor83
.xtermBgColor84
.xtermBgColor85
.xtermBgColor86
.xtermBgColor87
.xtermBgColor88
.xtermBgColor89
.xtermBgColor9
.xtermBgColor90
.xtermBgColor91
.xtermBgColor92
.xtermBgColor93
.xtermBgColor94
.xtermBgColor95
.xtermBgColor96
.xtermBgColor97
.xtermBgColor98
.xtermBgColor99
.xtermBlink
.xtermBold
.xtermColor0
.xtermColor1
.xtermColor10
.xtermColor100
.xtermColor101
.xtermColor102
.xtermColor103
.xtermColor104
.xtermColor105
.xtermColor106
.xtermColor107
.xtermColor108
.xtermColor109
.xtermColor11
.xtermColor110
.xtermColor111
.xtermColor112
.xtermColor113
.xtermColor114
.xtermColor115
.xtermColor116
.xtermColor117
.xtermColor118
.xtermColor119
.xtermColor12
.xtermColor120
.xtermColor121
.xtermColor122
.xtermColor123
.xtermColor124
.xtermColor125
.xtermColor126
.xtermColor127
.xtermColor128
.xtermColor129
.xtermColor13
.xtermColor130
.xtermColor131
.xtermColor132
.xtermColor133
.xtermColor134
.xtermColor135
.xtermColor136
.xtermColor137
.xtermColor138
.xtermColor139
.xtermColor14
.xtermColor140
.xtermColor141
.xtermColor142
.xtermColor143
.xtermColor144
.xtermColor145
.xtermColor146
.xtermColor147
.xtermColor148
.xtermColor149
.xtermColor15
.xtermColor150
.xtermColor151
.xtermColor152
.xtermColor153
.xtermColor154
.xtermColor155
.xtermColor156
.xtermColor157
.xtermColor158
.xtermColor159
.xtermColor16
.xtermColor160
.xtermColor161
.xtermColor162
.xtermColor163
.xtermColor164
.xtermColor165
.xtermColor166
.xtermColor167
.xtermColor168
.xtermColor169
.xtermColor17
.xtermColor170
.xtermColor171
.xtermColor172
.xtermColor173
.xtermColor174
.xtermColor175
.xtermColor176
.xtermColor177
.xtermColor178
.xtermColor179
.xtermColor18
.xtermColor180
.xtermColor181
.xtermColor182
.xtermColor183
.xtermColor184
.xtermColor185
.xtermColor186
.xtermColor187
.xtermColor188
.xtermColor189
.xtermColor19
.xtermColor190
.xtermColor191
.xtermColor192
.xtermColor193
.xtermColor194
.xtermColor195
.xtermColor196
.xtermColor197
.xtermColor198
.xtermColor199
.xtermColor2
.xtermColor20
.xtermColor200
.xtermColor201
.xtermColor202
.xtermColor203
.xtermColor204
.xtermColor205
.xtermColor206
.xtermColor207
.xtermColor208
.xtermColor209
.xtermColor21
.xtermColor210
.xtermColor211
.xtermColor212
.xtermColor213
.xtermColor214
.xtermColor215
.xtermColor216
.xtermColor217
.xtermColor218
.xtermColor219
.xtermColor22
.xtermColor220
.xtermColor221
.xtermColor222
.xtermColor223
.xtermColor224
.xtermColor225
.xtermColor226
.xtermColor227
.xtermColor228
.xtermColor229
.xtermColor23
.xtermColor230
.xtermColor231
.xtermColor232
.xtermColor233
.xtermColor234
.xtermColor235
.xtermColor236
.xtermColor237
.xtermColor238
.xtermColor239
.xtermColor24
.xtermColor240
.xtermColor241
.xtermColor242
.xtermColor243
.xtermColor244
.xtermColor245
.xtermColor246
.xtermColor247
.xtermColor248
.xtermColor249
.xtermColor25
.xtermColor250
.xtermColor251
.xtermColor252
.xtermColor253
.xtermColor254
.xtermColor255
.xtermColor26
.xtermColor27
.xtermColor28
.xtermColor29
.xtermColor3
.xtermColor30
.xtermColor31
.xtermColor32
.xtermColor33
.xtermColor34
.xtermColor35
.xtermColor36
.xtermColor37
.xtermColor38
.xtermColor39
.xtermColor4
.xtermColor40
.xtermColor41
.xtermColor42
.xtermColor43
.xtermColor44
.xtermColor45
.xtermColor46
.xtermColor47
.xtermColor48
.xtermColor49
.xtermColor5
.xtermColor50
.xtermColor51
.xtermColor52
.xtermColor53
.xtermColor54
.xtermColor55
.xtermColor56
.xtermColor57
.xtermColor58
.xtermColor59
.xtermColor6
.xtermColor60
.xtermColor61
.xtermColor62
.xtermColor63
.xtermColor64
.xtermColor65
.xtermColor66
.xtermColor67
.xtermColor68
.xtermColor69
.xtermColor7
.xtermColor70
.xtermColor71
.xtermColor72
.xtermColor73
.xtermColor74
.xtermColor75
.xtermColor76
.xtermColor77
.xtermColor78
.xtermColor79
.xtermColor8
.xtermColor80
.xtermColor81
.xtermColor82
.xtermColor83
.xtermColor84
.xtermColor85
.xtermColor86
.xtermColor87
.xtermColor88
.xtermColor89
.xtermColor9
.xtermColor90
.xtermColor91
.xtermColor92
.xtermColor93
.xtermColor94
.xtermColor95
.xtermColor96
.xtermColor97
.xtermColor98
.xtermColor99
.xterm-cursor-blink-on
.xtermHidden
.xtermInvertBgColor
.xtermInvertColor
.xtermItalic
.xterm-selection
.xtermStrike
.xtermUnderline
.xterm-viewport
Are all of these declarations things I can safely change? Where can I find more detailed information about how to edit .rsTheme files and what type of feature each selector points to? Is there a way to include the selectors in the .tmTheme file, so that RStudio creates the "generated values" automatically?

Related

Include an interactive plot (wordcloud) in a dashboard

I created an interactive dashboard using hvPlot .interactive and Panel:
template = pn.template.FastListTemplate(
title='Central Africa - Word Frequency Analysis',
sidebar=['Frequency' , yaxis],
main=[ihvplot.panel(), ipanel.panel()],
accent_base_color="#88d8b0",
header_background="#88d8b0",
sidebar_width=450,
theme='dark',
)
template.show()
Where ivplot and ipanel are my interactive plot and table, respectively. However, I would like to put instead of the table, an interactive wordcloud which I created using ipywidgets:
list1 = ['Corbeau News','Journal de Bangui','Le Potentiel','Ndjoni Sango','RJDH','Radio
Lengo Songo','Radio Ndeke Luka']
def makingclouds(Category,frame,col,atitle):
wordcloud_bangui = WordCloud(stopwords= stopword , width=1600 , height=800 ,
background_color="black",
colormap="Set2").generate(''.join(data_file_1['Content']))
plt.figure(figsize=(20,10),facecolor='k')
plt.title(atitle, fontsize=40)#,fontweight="bold")
plt.imshow(wordcloud_bangui, interpolation="bilinear")
plt.axis("off")
plt.tight_layout(pad=0)
wordcloud = interact(makingclouds, Category=list1, df=fixed(data_file_1),
col=fixed('Content'),
atitle=fixed('Most used words media - Central Africa'),
frame=fixed(data_file_1[['Source','Content']]))
My question is how can I do it. I've tried simply to put 'wordcloud' instead of itable in the 4th line of the first piece of code but it tells me that the object does not have a function panel.
What can I do?

SDO_GEOM.RELATE incorrect result

I want to determine the relationship between two polygons. They are almost equal, but oracle determines the relationship as "TOUCH"
select SDO_GEOM.RELATE (
MDSYS.SDO_GEOMETRY(2003,25832,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,197,2003,1),MDSYS.SDO_ORDINATE_ARRAY(374119.43424706,5691944.80315028,374122.56159561,5691942.35776406,374125.07036344,5691939.84899623,374125.6278674,5691939.57024425,374136.1929,5691929.95,374126.74287533,5691918.94259766,374123.7908,5691919.3093,374120.83482781,5691914.30907697,374137.39360515,5691894.33055213,374144.35862375,5691897.41123343,374184.73010996,5691918.44877131,374178.5571,5691928.4882,374193.0645,5691937.4126,374203.6583,5691943.778,374207.76840888,5691947.06665824,374207.8497,5691953.1253,374206.20370687,5691961.70609861,374201.4204,5691986.3921,374197.2671265,5692000.33817609,374196.52293214,5692003.61939276,374190.5211,5692028.0781,374186.8797,5692037.6394,374182.61070422,5692050.1790179,374181.89211667,5692052.69407434,374175.69429903,5692070.47911627,374171.47259715,5692080.89863579,374162.49025274,5692095.98897439,374152.1525154,5692109.0546975,374127.197,5692126.3677,374120.27636327,5692131.38310293,374108.8928,5692139.6328,374097.09878544,5692131.02011759,374090.76457677,5692127.60988405,374086.32383809,5692125.21906354,374074.95934331,5692117.35133638,374068.20495934,5692112.67522439,374059.81117092,5692106.94549012,374054.0060377,5692102.681321,374049.24982463,5692099.01637733,374036.28831379,5692081.88669367,374029.91084926,5692072.3654086,374018.47857381,5692057.2113746,374005.212338585,5692038.71428125,373996.87175187,5692045.21896561,373996.30696508,5692049.163621,373988.90696508,5692054.163621,373972.30696508,5692032.963621,373964.50696508,5692021.763621,373956.30696508,5692010.163621,373944.90696508,5691998.763621,373932.50696508,5691987.163621,373921.30696508,5691975.963621,373900.086080328,5691954.83317774,373892.43,5691960.33,373876.72,5691933.43,373845.50696508,5691919.563621,373828.50696508,5691901.763621,373800.30696508,5691873.563621,373789.10696508,5691861.163621,373801.992436666,5691849.15142511,373756.70696508,5691803.963621,373735.10696508,5691781.163621,373718.70696508,5691764.163621,373704.90696508,5691748.963621,373713.30696508,5691739.563621,373725.61877479,5691729.9487546,373744.1508009,5691750.4148284,373774.01302383,5691782.0868812,373807.60210366,5691813.6839065,373831.81451845,5691837.682647,373853.7996963,5691858.39944878,373902.67941274,5691904.45918063,373922.98478297,5691923.5930868,373961.28732974,5691965.43010412,373986.1373196,5691992.57319366,374027.89090222,5692038.17970046,374043.46520697,5692055.19116608,374064.30270376,5692043.73054285,374068.64153567,5692041.3441853,374111.8750999,5692084.5659021,374118.00007278,5692080.6143047,374123.72989196,5692076.2675461,374130.44761047,5692071.1304726,374133.58868439,5692068.63372068,374138.15322833,5692065.0054922,374140.03229695,5692062.93010266,374144.77215088,5692057.6950393,374152.35208147,5692047.24340754,374155.98479933,5692042.2344132,374158.18891274,5692036.20983738,374161.91219536,5692026.0328663,374152.64292952,5692013.41663374,374138.05718211,5691993.56423284,374126.85729247,5691978.32026263,374119.54566412,5691965.47551012,374118.81594799,5691964.33851056,374111.04836631,5691952.23553446,374119.43424706,5691944.80315028,374145.1616,5691963.034,374157.9885,5691964.1404,374153.0214,5691949.1144,374140.9722,5691953.6877,374145.1616,5691963.034))
, 'determine',
MDSYS.SDO_GEOMETRY(2003,25832,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,203,2003,1),MDSYS.SDO_ORDINATE_ARRAY(374043.465206972,5692055.19116608,374068.641535671,5692041.3441853,374111.8750999,5692084.5659021,374118.00007278,5692080.6143047,374123.72989196,5692076.2675461,374130.44761047,5692071.1304726,374133.588684394,5692068.63372068,374138.15322833,5692065.0054922,374144.77215088,5692057.6950393,374152.352081467,5692047.24340754,374155.98479933,5692042.2344132,374158.188912742,5692036.20983738,374161.91219536,5692026.0328663,374126.857292471,5691978.32026263,374119.545664122,5691965.47551012,374111.04836631,5691952.23553446,374110.6621255,5691951.55287628,374111.475518872,5691951.02636587,374122.561595614,5691942.35776406,374125.070363442,5691939.84899623,374125.627867404,5691939.57024425,374136.1929,5691929.95,374126.742875328,5691918.94259766,374123.7908,5691919.3093,374120.834827807,5691914.30907697,374137.393605153,5691894.33055213,374146.752914089,5691898.47024646,374184.73010996,5691918.44877131,374178.5571,5691928.4882,374193.0645,5691937.4126,374203.6583,5691943.778,374207.768408877,5691947.06665824,374207.8497,5691953.1253,374203.5906,5691975.3286,374202.7846,5691980.152,374201.4204,5691986.3921,374197.2671265,5692000.33817609,374194.449392315,5692012.7618075,374190.5211,5692028.0781,374186.8797,5692037.6394,374182.610704222,5692050.1790179,374181.892116669,5692052.69407434,374175.694299027,5692070.47911627,374171.472597154,5692080.89863579,374165.4544264,5692091.22833186,374162.490252744,5692095.98897439,374152.152515397,5692109.0546975,374127.197,5692126.3677,374108.8928,5692139.6328,374097.098785442,5692131.02011759,374086.323838095,5692125.21906354,374068.204959335,5692112.67522439,374057.4343,5692105.323,374049.249824632,5692099.01637733,374036.288313788,5692081.88669367,374029.910849257,5692072.3654086,374022.2691,5692062.4965,374004.871025728,5692038.81214604,374003.683827056,5692039.8297449,373996.899834639,5692045.34173874,373996.136635492,5692049.24253438,373988.928643549,5692054.24572879,373972.318502371,5692033.04574923,373965.288134667,5692022.85754718,373956.026280328,5692009.98017827,373944.541676103,5691998.51343684,373937.016587809,5691991.34811373,373931.350286264,5691986.07155779,373924.754591345,5691979.50584331,373918.848446349,5691973.53973745,373900.050715829,5691954.83194822,373890.666840785,5691964.06592111,373849.937585098,5691924.40126746,373831.349004547,5691904.97320263,373805.564844428,5691878.82926353,373789.134937747,5691861.32001991,373801.487349339,5691848.96760832,373759.633061517,5691806.87346785,373733.009417114,5691779.53026549,373704.815450301,5691748.92374358,373713.083282479,5691739.59593292,373725.618774786,5691729.9487546,373748.954436917,5691755.50959358,373774.01302383,5691782.0868812,373798.149147215,5691804.49899316,373802.51787652,5691808.5556699,373807.60210366,5691813.6839065,373831.81451845,5691837.682647,373842.458795054,5691847.71283052,373865.216245828,5691869.157351,373888.862942235,5691891.43981446,373922.98478297,5691923.5930868,373935.147043721,5691936.87765288,373966.632992237,5691971.26905201,373979.962420575,5691985.82848921,373990.042422418,5691996.83865034,373998.422113111,5692005.99159954,374007.658279099,5692016.0800576,374016.018029933,5692025.21122693,374031.723718158,5692042.3661998,374043.465206972,5692055.19116608,374145.1616,5691963.034,374157.9885,5691964.1404,374153.0214,5691949.1144,374140.9722,5691953.6877,374145.1616,5691963.034))
, 0.0000005) from dual;
What version of Oracle ?
I tried the test case with Oracle 12.2. I am getting OVERLAPBDYINTERSECT at all tolerances, except at 0.5 where I get COVEREDBY.
I do not get TOUCH with any tolerance. Definitely TOUCH is incorrect. If you do get TOUCH, then that would be a bug that needs looking at - unless you do it on an old no-longer supported version ...
I recommend to use JTS Topology Suite, this is a open-source java based geometry tool. Use SDO_UTIL.TO_WKTGEOMETRY, the result you can copy/paste to JTS:
POLYGON ((374119.43424706 5691944.80315028, 374122.56159561 5691942.35776406, 374125.07036344 5691939.84899623, 374125.6278674 5691939.57024425, 374136.1929 5691929.95, 374126.74287533 5691918.94259766, 374123.7908 5691919.3093, 374120.83482781 5691914.30907697, 374137.39360515 5691894.33055213, 374144.35862375 5691897.41123343, 374184.73010996 5691918.44877131, 374178.5571 5691928.4882, 374193.0645 5691937.4126, 374203.6583 5691943.778, 374207.76840888 5691947.06665824, 374207.8497 5691953.1253, 374206.20370687 5691961.70609861, 374201.4204 5691986.3921, 374197.2671265 5692000.33817609, 374196.52293214 5692003.61939276, 374190.5211 5692028.0781, 374186.8797 5692037.6394, 374182.61070422 5692050.1790179, 374181.89211667 5692052.69407434, 374175.69429903 5692070.47911627, 374171.47259715 5692080.89863579, 374162.49025274 5692095.98897439, 374152.1525154 5692109.0546975, 374127.197 5692126.3677, 374120.27636327 5692131.38310293, 374108.8928 5692139.6328, 374097.09878544 5692131.02011759, 374090.76457677 5692127.60988405, 374086.32383809 5692125.21906354, 374074.95934331 5692117.35133638, 374068.20495934 5692112.67522439, 374059.81117092 5692106.94549012, 374054.0060377 5692102.681321, 374049.24982463 5692099.01637733, 374036.28831379 5692081.88669367, 374029.91084926 5692072.3654086, 374018.47857381 5692057.2113746, 374005.212338585 5692038.71428125, 373996.87175187 5692045.21896561, 373996.30696508 5692049.163621, 373988.90696508 5692054.163621, 373972.30696508 5692032.963621, 373964.50696508 5692021.763621, 373956.30696508 5692010.163621, 373944.90696508 5691998.763621, 373932.50696508 5691987.163621, 373921.30696508 5691975.963621, 373900.086080328 5691954.83317774, 373892.43 5691960.33, 373876.72 5691933.43, 373845.50696508 5691919.563621, 373828.50696508 5691901.763621, 373800.30696508 5691873.563621, 373789.10696508 5691861.163621, 373801.992436666 5691849.15142511, 373756.70696508 5691803.963621, 373735.10696508 5691781.163621, 373718.70696508 5691764.163621, 373704.90696508 5691748.963621, 373713.30696508 5691739.563621, 373725.61877479 5691729.9487546, 373744.1508009 5691750.4148284, 373774.01302383 5691782.0868812, 373807.60210366 5691813.6839065, 373831.81451845 5691837.682647, 373853.7996963 5691858.39944878, 373902.67941274 5691904.45918063, 373922.98478297 5691923.5930868, 373961.28732974 5691965.43010412, 373986.1373196 5691992.57319366, 374027.89090222 5692038.17970046, 374043.46520697 5692055.19116608, 374064.30270376 5692043.73054285, 374068.64153567 5692041.3441853, 374111.8750999 5692084.5659021, 374118.00007278 5692080.6143047, 374123.72989196 5692076.2675461, 374130.44761047 5692071.1304726, 374133.58868439 5692068.63372068, 374138.15322833 5692065.0054922, 374140.03229695 5692062.93010266, 374144.77215088 5692057.6950393, 374152.35208147 5692047.24340754, 374155.98479933 5692042.2344132, 374158.18891274 5692036.20983738, 374161.91219536 5692026.0328663, 374152.64292952 5692013.41663374, 374138.05718211 5691993.56423284, 374126.85729247 5691978.32026263, 374119.54566412 5691965.47551012, 374118.81594799 5691964.33851056, 374111.04836631 5691952.23553446, 374119.43424706 5691944.80315028), (374145.1616 5691963.034, 374157.9885 5691964.1404, 374153.0214 5691949.1144, 374140.9722 5691953.6877, 374145.1616 5691963.034))
POLYGON ((374043.465206972 5692055.19116608, 374068.641535671 5692041.3441853, 374111.8750999 5692084.5659021, 374118.00007278 5692080.6143047, 374123.72989196 5692076.2675461, 374130.44761047 5692071.1304726, 374133.588684394 5692068.63372068, 374138.15322833 5692065.0054922, 374144.77215088 5692057.6950393, 374152.352081467 5692047.24340754, 374155.98479933 5692042.2344132, 374158.188912742 5692036.20983738, 374161.91219536 5692026.0328663, 374126.857292471 5691978.32026263, 374119.545664122 5691965.47551012, 374111.04836631 5691952.23553446, 374110.6621255 5691951.55287628, 374111.475518872 5691951.02636587, 374122.561595614 5691942.35776406, 374125.070363442 5691939.84899623, 374125.627867404 5691939.57024425, 374136.1929 5691929.95, 374126.742875328 5691918.94259766, 374123.7908 5691919.3093, 374120.834827807 5691914.30907697, 374137.393605153 5691894.33055213, 374146.752914089 5691898.47024646, 374184.73010996 5691918.44877131, 374178.5571 5691928.4882, 374193.0645 5691937.4126, 374203.6583 5691943.778, 374207.768408877 5691947.06665824, 374207.8497 5691953.1253, 374203.5906 5691975.3286, 374202.7846 5691980.152, 374201.4204 5691986.3921, 374197.2671265 5692000.33817609, 374194.449392315 5692012.7618075, 374190.5211 5692028.0781, 374186.8797 5692037.6394, 374182.610704222 5692050.1790179, 374181.892116669 5692052.69407434, 374175.694299027 5692070.47911627, 374171.472597154 5692080.89863579, 374165.4544264 5692091.22833186, 374162.490252744 5692095.98897439, 374152.152515397 5692109.0546975, 374127.197 5692126.3677, 374108.8928 5692139.6328, 374097.098785442 5692131.02011759, 374086.323838095 5692125.21906354, 374068.204959335 5692112.67522439, 374057.4343 5692105.323, 374049.249824632 5692099.01637733, 374036.288313788 5692081.88669367, 374029.910849257 5692072.3654086, 374022.2691 5692062.4965, 374004.871025728 5692038.81214604, 374003.683827056 5692039.8297449, 373996.899834639 5692045.34173874, 373996.136635492 5692049.24253438, 373988.928643549 5692054.24572879, 373972.318502371 5692033.04574923, 373965.288134667 5692022.85754718, 373956.026280328 5692009.98017827, 373944.541676103 5691998.51343684, 373937.016587809 5691991.34811373, 373931.350286264 5691986.07155779, 373924.754591345 5691979.50584331, 373918.848446349 5691973.53973745, 373900.050715829 5691954.83194822, 373890.666840785 5691964.06592111, 373849.937585098 5691924.40126746, 373831.349004547 5691904.97320263, 373805.564844428 5691878.82926353, 373789.134937747 5691861.32001991, 373801.487349339 5691848.96760832, 373759.633061517 5691806.87346785, 373733.009417114 5691779.53026549, 373704.815450301 5691748.92374358, 373713.083282479 5691739.59593292, 373725.618774786 5691729.9487546, 373748.954436917 5691755.50959358, 373774.01302383 5691782.0868812, 373798.149147215 5691804.49899316, 373802.51787652 5691808.5556699, 373807.60210366 5691813.6839065, 373831.81451845 5691837.682647, 373842.458795054 5691847.71283052, 373865.216245828 5691869.157351, 373888.862942235 5691891.43981446, 373922.98478297 5691923.5930868, 373935.147043721 5691936.87765288, 373966.632992237 5691971.26905201, 373979.962420575 5691985.82848921, 373990.042422418 5691996.83865034, 373998.422113111 5692005.99159954, 374007.658279099 5692016.0800576, 374016.018029933 5692025.21122693, 374031.723718158 5692042.3661998, 374043.465206972 5692055.19116608), (374145.1616 5691963.034, 374157.9885 5691964.1404, 374153.0214 5691949.1144, 374140.9722 5691953.6877, 374145.1616 5691963.034))
I am not an expert, TOUCHES means "none of the points common to both geometries intersect the interiors of both geometries." When you check the picture you see one point interiors the other polygon (marked by red circle)
I assume it is a bug of Oracle 12.1.0.2.0, but I found a workaround:
alter session set spatial_vector_acceleration=TRUE;

trying to parse specific data using xpath

I have a small xml file that I'm trying to grab the away_team first and then the home_team second.
/game/team/statistics/#goals gives me the data I want but I need to reverse the order. So I'm trying to understand how to get the away_team goals first, followed by the home_team.
Below is the file
<game id="f24275a9-4f30-4a81-abdf-d16a9aeda087" status="closed" coverage="full" home_team="4416d559-0f24-11e2-8525-18a905767e44" away_team="44167db4-0f24-11e2-8525-18a905767e44" scheduled="2013-10-10T23:00:00+00:00" attendance="18210" start_time="2013-10-10T23:08:00+00:00" end_time="2013-10-11T01:32:00+00:00" clock="00:00" period="3" xmlns="http://feed.elasticstats.com/schema/hockey/game-v2.0.xsd">
<venue id="bd7b42fa-19bb-4b91-8615-214ccc3ff987" name="First Niagara Center" capacity="18690" address="One Seymour H. Knox III Plaza" city="Buffalo" state="NY" zip="14203" country="USA"/>
<team name="Sabres" market="Buffalo" id="4416d559-0f24-11e2-8525-18a905767e44" points="1">
<scoring>
<period number="1" sequence="1" points="1"/>
<period number="2" sequence="2" points="0"/>
<period number="3" sequence="3" points="0"/>
</scoring>
<statistics goals="1" assists="2" penalties="7" penalty_minutes="23" team_penalties="0" team_penalty_minutes="0" shots="27" blocked_att="14" missed_shots="8" hits="25" giveaways="5" takeaways="10" blocked_shots="7" faceoffs_won="22" faceoffs_lost="28" powerplays="1" faceoffs="50" faceoff_win_pct="44.0" shooting_pct="3.7" points="3">
<powerplay faceoffs_won="2" faceoffs_lost="0" shots="0" goals="0" missed_shots="1" assists="0" faceoff_win_pct="100.0" faceoffs="2"/>
<shorthanded faceoffs_won="3" faceoffs_lost="3" shots="1" goals="0" missed_shots="0" assists="0" faceoffs="6" faceoff_win_pct="50.0"/>
<evenstrength faceoff_win_pct="40.5" missed_shots="7" goals="1" faceoffs_won="17" shots="26" faceoffs="42" faceoffs_lost="25" assists="2"/>
<penalty shots="0" goals="0" missed_shots="0"/>
</statistics>
<shootout shots="0" missed_shots="0" goals="0" shots_against="0" goals_against="0" saves="0" saves_pct="0"/>
<goaltending shots_against="33" goals_against="4" saves="29" saves_pct="0.879" total_shots_against="33" total_goals_against="4">
<powerplay shots_against="0" goals_against="0" saves="0" saves_pct="0"/>
<shorthanded shots_against="7" goals_against="0" saves="7" saves_pct="1.0"/>
<evenstrength goals_against="4" saves_pct="0.846" shots_against="26" saves="22"/>
<penalty shots_against="0" goals_against="0" saves="0" saves_pct="0"/>
<emptynet goals_against="0" shots_against="0">
<powerplay goals_against="0"/>
<shorthanded goals_against="0"/>
<evenstrength goals_against="0"/>
</emptynet>
</goaltending>
Here's an XPath 2.0 expression that should do what you asked, yielding a sequence of two elements:
(/game/team[#id = /game/#home_team]/statistics/#goals,
/game/team[#id = /game/#away_team]/statistics/#goals)
Credit to #Ian for sleuthing out the details of the question.
In XPath 1.0, you could concatenate string data from the two teams in whatever order you want:
concat(/game/team[#id = /game/#home_team]/statistics/#goals, ' ',
/game/team[#id = /game/#away_team]/statistics/#goals)
But as Ian said, you can't produce a nodeset with an order different from document order. (I don't think a nodeset has any intrinsic order at all... it's how it's processed that imposes an order.)
Update:
As Ian pointed out, your XML data is in a namespace, thanks to the default namespace declaration on <game>. Since you said that "/game/team/statistics/#goals gives me the data", I'm assuming that you've already taken care of this aspect of the problem, perhaps by declaring the default namespace in your XPath execution environment.

Extract fields out of a ruby hash with special chars

I'm working to turn a pdf signature visible, using origami.pdf, and meanwhile I noticed that my signature is an hash, and so I try to capture fields like "Location", "Reason", "Date", "ContactInfo".
{/Type=>/Sig, /Contents=>"0\x82\a\xAE\x06\t*\x86H\x86\xF7\r\x01\a\x02\xA0\x82\a\
x9F0\x82\a\x9B\x02\x01\x011\v0\t\x06\x05+\x0E\x03\x02\x1A\x05\x000#\x06\t*\x86H\
x86\xF7\r\x01\a\x01\xA0\x16\x04\x14\xEF8uEn1#\x11M\x95\xE4\xD7\x9C\xFE(\xCF\xB7\
x92\x01\xC2\xA0\x82\x05\x970\x82\x05\x930\x82\x04{\xA0\x03\x02\x01\x02\x02\x04Bo
\x93\x8C0\r\x06\t*\x86H\x86\xF7\r\x01\x01\x05\x05\x000>1\v0\t\x06\x03U\x04\x06\x
13\x02pt1\x150\x13\x06\x03U\x04\n\x13\fMULTICERT-CA1\x180\x16\x06\x03U\x04\x03\x
13\x0FMULTICERT-CA 020\x1E\x17\r130320170147Z\x17\r140320164736Z0\x81\xA51\v0\t\
x06\x03U\x04\x06\x13\x02PT1\x150\x13\x06\x03U\x04\n\x13\fMULTICERT-CA1\x160\x14\
x06\x03U\x04\v\x13\rCERTIPOR - RA1\x120\x10\x06\x03U\x04\v\x13\tCorporate1 0\x1E
\x06\x03U\x04\v\x13\x17ESCRITA INTELIGENTE LDA1\x180\x16\x06\x03U\x04\v\x13\x0FW
eb Application1\x170\x15\x06\x03U\x04\x03\x13\x0ERECIBOS ONLINE0\x81\x9F0\r\x06\
t*\x86H\x86\xF7\r\x01\x01\x01\x05\x00\x03\x81\x8D\x000\x81\x89\x02\x81\x81\x00\x
AC\xCE\xA4\x06\x901\xB5x\x89lE\rw\xC8<\x13\xDDu\xC6h\xBF'b6\x8D\xB0\xA0\xB1Y\e\x
18\x00\xE5\x8C\x1A\xCD\xBB%\xDA\x15P\x1A\xF91\xF9\xF6\xBA\xE0\xF8\xF6LH\x16\x86\
xE9Y\xDE\x00Z\xEC\x82\xB3=\r2fP7\xD1\x8B\xF3k\xF7|MVb\fB\xFB\xBA\x92\xD3\xFF9\x7
F\x9D\x83w\xFE\xAB\xBA\x93G\x8F\xCE\xF0\t!d\x83\xD3F\xAC\xCCv\xCA\x10\xC9\xB8e;\
x80\xB8\xF6\xEBI\xBD\x93\x89zC\xDF\x06-\r\x9E\xD3\x02\x03\x01\x00\x01\xA3\x82\x0
2\xB30\x82\x02\xAF0\v\x06\x03U\x1D\x0F\x04\x04\x03\x02\x03\xF808\x06\b+\x06\x01\
x05\x05\a\x01\x01\x04,0*0(\x06\b+\x06\x01\x05\x05\a0\x01\x86\x1Chttp://ocsp.mult
icert.com/ca0\x81\xE0\x06\x03U\x1D \x04\x81\xD80\x81\xD50M\x06\t+\x06\x01\x04\x0
1\xB0<\n\x020#0>\x06\b+\x06\x01\x05\x05\a\x02\x01\x162http://www.multicert.com/c
ps/multicert-ca-cps.html0\x81\x83\x06\v+\x06\x01\x04\x01\xB0<\n\x02\x88\x060t0r\
x06\b+\x06\x01\x05\x05\a\x02\x020f\x1Ed\x00h\x00t\x00t\x00p\x00:\x00/\x00/\x00w\
x00w\x00w\x00.\x00m\x00u\x00l\x00t\x00i\x00c\x00e\x00r\x00t\x00.\x00c\x00o\x00m\
x00/\x00c\x00p\x00/\x00m\x00u\x00l\x00t\x00i\x00c\x00e\x00r\x00t\x00-\x00c\x00a\
x00-\x001\x000\x003\x000\x00.\x00h\x00t\x00m\x00l0\x11\x06\t`\x86H\x01\x86\xF8B\
x01\x01\x04\x04\x03\x02\x04\xB00 \x06\x03U\x1D\x11\x04\x190\x17\x81\x15info#reci
bosonline.pt0\x82\x01\x01\x06\x03U\x1D\x1F\x04\x81\xF90\x81\xF60\x81\x9A\xA0\x81
\x97\xA0\x81\x94\x86/http://www.multicert.com/ca/multicert-ca-02.crl\x86aldap://
ldap.multicert.com/cn=MULTICERT-CA%2002,o=MULTICERT-CA,c=PT?certificateRevocatio
nList?base0W\xA0U\xA0S\xA4Q0O1\v0\t\x06\x03U\x04\x06\x13\x02pt1\x150\x13\x06\x03
U\x04\n\x13\fMULTICERT-CA1\x180\x16\x06\x03U\x04\x03\x13\x0FMULTICERT-CA 021\x0F
0\r\x06\x03U\x04\x03\x13\x06CRL2950\x1F\x06\x03U\x1D#\x04\x180\x16\x80\x14\x1D\x
C3\xB9\x88\xA5\x18\xBE`\xA7,\xA6c\xCAf*\xFC\f'\xC1\xBD0\x1D\x06\x03U\x1D\x0E\x04
\x16\x04\x14\x06\xD8\x1Fr6a\x9E\xEB\x176\x9C)\x9E-t\xFF\xD080\x190\t\x06\x03U\x1
D\x13\x04\x020\x000\r\x06\t*\x86H\x86\xF7\r\x01\x01\x05\x05\x00\x03\x82\x01\x01\
x00AQ\x1F\xCD\\ua\x98\e\rT2kW\xF7\xB8|CZ\xAC\xB7\xA2\x96(\bv\x83\x13\x89*\xB1#r7
\xE9WW{\x87T\x14\xDE\x81\nA2?\x9E\nv\x8E\x9A\xC4\\\x0Ff\xAE\t<2\xC1\x14S\xC6F?\x
85o\xEFb\xE2x!\x13M\xD0\x9Fu \x80\x00\x04\x0E\x89\xA8\x14\xE60\x96#\xC5\xD0Ac\xC
0<\xFD\xE31S\x90\x8A\xC3\xDF\xCA[\x1Cf\xC3\xDC\xB8\x96D\xA3\x03\x0F\xE7\x94\xD5\
v\xD2U\xD3\x96SZz\xF2g\xC3\xA58\x14{\x93q\xD0_#\xD8\xCAH\x1A\xEB\xC7\xD7\xA7\xD9
|.\x7F\xB5\xABI\xC4\xE4UNH\x00d\x8B\xC7k\x1A\xF5a*\x1D\x93a\xD1r\bNpi\t(\xA9\x11
\xFC \x983\xC5\x06!\x9C\xF1\x86\xB6P{Y\x9EL\x0FB\xF3\xBF#\xC2\xB8\xF0\xA0x\xD0\x
1D\x9B\xF5\xFDGF\xD9rS\xEEO\xE8\xF4rH\x9B=\xC2opr\xC6Xr\x18\x82[\xB3\x06\x10t\xB
9\xC2#\xF8\x92\x8D6\xFE\xFC\x0Fp\x88\x97u,\xD9F1\x82\x01\xC70\x82\x01\xC3\x02\x0
1\x010F0>1\v0\t\x06\x03U\x04\x06\x13\x02pt1\x150\x13\x06\x03U\x04\n\x13\fMULTICE
RT-CA1\x180\x16\x06\x03U\x04\x03\x13\x0FMULTICERT-CA 02\x02\x04Bo\x93\x8C0\t\x06
\x05+\x0E\x03\x02\x1A\x05\x00\xA0\x81\xD80\x18\x06\t*\x86H\x86\xF7\r\x01\t\x031\
v\x06\t*\x86H\x86\xF7\r\x01\a\x010\x1C\x06\t*\x86H\x86\xF7\r\x01\t\x051\x0F\x17\
r130329223127Z0#\x06\t*\x86H\x86\xF7\r\x01\t\x041\x16\x04\x14\x93\xD9l\xBD68\xDB
*M\xADY\xF8\x8F<\x8E\x94m\xACS\xAE0y\x06\t*\x86H\x86\xF7\r\x01\t\x0F1l0j0\v\x06\
t`\x86H\x01e\x03\x04\x01*0\v\x06\t`\x86H\x01e\x03\x04\x01\x160\v\x06\t`\x86H\x01
e\x03\x04\x01\x020\n\x06\b*\x86H\x86\xF7\r\x03\a0\x0E\x06\b*\x86H\x86\xF7\r\x03\
x02\x02\x02\x00\x800\r\x06\b*\x86H\x86\xF7\r\x03\x02\x02\x01#0\a\x06\x05+\x0E\x0
3\x02\a0\r\x06\b*\x86H\x86\xF7\r\x03\x02\x02\x01(0\r\x06\t*\x86H\x86\xF7\r\x01\x
01\x01\x05\x00\x04\x81\x803]\xBC\xA2\xC5\x0F&\r\x94\x96\xD5\xBD\xF2\x96\xB3\x86\
x9D\x01\xA3{5\xEC\xA5\xEC\x8B=\r\xD7%w0o\x9C\x7F\v\x17YX\x80\xAF\x1A\x8F\x1E\xBB
e\xBCp4\xF7\x80\x89b&?\xCE<\xCC\x8D\xFE\xEFK\x86\x0F\xD8Q\xFFU\x04\x11E\t\xED\xC
9=WF\x93\x10w\xC6g\xD4\e`\xE5\xB5{Ax~%\xE9\x92\xF5\x01\x19\xCDS\xE1|%\"\xB2\xC6\
x107\xE9\xF7M\xD7\xA3\x11MJ\xAF\x03\x0F\xFF\x8D:s\x84g\xB6\xD5o\xAF\xB0\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00", /Filter=>/Adobe.PPKMS, /SubFilter=>/adbe.pkcs7.sha1, /
ByteRange=>[0, 12883, 17081, 1098], /Location=>"Portugal", /ContactInfo=>"email#email.com", /Reason=>"Proof of Concept", /M=>"D:20130329223127Z00'00", /P
rop_Build=>{/Filter=>{/Name=>/Adobe.PPKMS, /R=>131101, /Date=>"2013-03-29 22:31:
27 +0000"}, /SigQ=>{/Preview=>false, /R=>131101}, /PubSec=>{/NonEFontNoWarn=>fal
se, /Date=>"2013-03-29 22:31:27 +0000", /R=>131101}, /App=>{/TrustedMode=>false,
/OS=>[/Win], /R=>458752, /Name=>/Exchange-Pro}}}
If i extract the keys (pdf.signature.keys) i get
/Type
/Contents
/Filter
/SubFilter
/ByteRange
/Location
/ContactInfo
/Reason
/M
/Prop_Build
Now, how do I reach the contents of these keys ?
I cannot simply do pdf.signature[/Location] , because ruby says it is a syntax error...
Any ideas?
I took a look at the source for origami-pdf, and it seems that the / prepending every key in that output is generated on-the-fly from Origami::Name.to_s. Also looking at its eql? definition it seems like it just compares it to the underlying string value. So this should work, have you tried it?
signature[Origami::Name.new('Location')]
As generating an Origami::Name object with /Location seems to be so hard, I solved this with a different approach :
location = pdf.signature[pdf.signature.keys[5]]
The Output returns Portugal, and this is the approach I will take, since the array's keys position are supposed to be static.
I would appreciate a more elegant solution though

help with LibSVM input data

I am using the LibSVM tool for my support vector classification implementation:-
The first line in my input data file looks as so:-
+1 15752:47 6279:45 475:40 5231:30 515:29 7529:28 11623:24 274:24 15431:21 7342:20 4819:20 7598:18 8853:17 11134:16 501:16 911:15 4656:15 5875:14 10725:13 7334:13 13762:13 8295:12 9314:12 317:12 10641:12 2690:12 8771:12 4698:11 11519:10 10069:9 10019:8 1120:8 15017:8 254:8 7900:8 5395:8 486:8 1763:8 11183:7 9163:7 9219:7 1827:7 11901:7 4068:6 15592:6 9925:6 3464:5 8408:5 15348:5 8432:5 10064:5 6319:4 5729:4 8334:4 11817:4 6238:4 4521:4 11761:4 328:4 15876:4 6494:4 280:4 14628:4 5514:4 6383:4 9149:4 2456:4 6741:4 482:4 2773:4 10873:3 8715:3 8802:3 11478:3 11848:3 12269:3 10592:3 12911:3 11051:3 10798:3 8412:3 232:3 7654:3 1210:3 502:3 12687:3 14459:2 2725:2 9851:2 5799:2 16046:2 3612:2 1440:2 8503:2 245:2 9780:2 322:2 11902:2 8977:2 14949:2 5710:2 6423:2 9896:2 5507:2 10646:2 9932:2 14894:2 3997:2 13429:2 9845:2 8547:2 2720:2 861:2 2830:2 5703:2 6994:2 13973:2 3086:2 262:2 7793:2 208:2 3221:2 13229:2 13350:2 372:2 10384:2 3970:2 13506:2 9720:2 8981:2 9296:1 10276:1 15098:1 6631:1 383:1 6510:1 13304:1 9646:1 8233:1 1080:1 8537:1 12129:1 10711:1 14569:1 2969:1 1215:1 12435:1 7689:1 12626:1 14609:1 13474:1 4488:1 103:1 621:1 12430:1 617:1 514:1 11673:1 215:1 8817:1 10968:1 4717:1 1807:1 5737:1 3156:1 14320:1 13457:1 12411:1 9596:1 15028:1 10531:1 4301:1 4799:1 6013:1 7619:1 6717:1 9344:1 1817:1 15868:1 11307:1 9632:1 6945:1 9916:1 11899:1 883:1 11696:1 14503:1 316:1 4012:1 9994:1 8501:1 1847:1 12534:1 14966:1 11800:1 8093:1 13403:1 7309:1 5957:1 6538:1 2535:1 7042:1 13792:1 15001:1 4894:1 4921:1 13739:1 15875:1 15802:1 14253:1 10376:1 974:1 1882:1 2397:1 8105:1 4725:1 7707:1 7506:1 9749:1 8640:1 12566:1
The name of my input data file is --> a1a
I tried to run the program on my windows command prompt as
svm-train a1a
I get the following error
Wrong input format at line 1
Could somebody help me out here? I can't seem to figure out what's wrong.
Thanks.
The feature numbers (14253, 10376, etc) have to be listed in increasing order. Once you do that, svm-train will take that data. So, for example, your file needs to begin:
+1 103:1 208:2 215:1 232:3 245:2 254:8 262:2 274:24 280:4 316:1 317:12 322:2 328:4 372:2 383:1 475:40 482:4 486:8 501:16 502:3 514:1 515:29 617:1 621:1 861:2 883:1 911:15 974:1 1080:1 1120:8 1210:3 1215:1 1440:2 1763:8 1807:1 1817:1 1827:7 1847:1 1882:1 2397:1 2456:4 2535:1 2690:12 2720:2 2725:2 2773:4 2830:2 2969:1 3086:2 3156:1 3221:2 3464:5 3612:2 3970:2 3997:2 4012:1 4068:6 4301:1 4488:1 4521:4 4656:15 4698:11 4717:1 4725:1 4799:1 4819:20 4894:1 4921:1 5231:30 5395:8 5507:2 5514:4 5703:2 5710:2 5729:4 5737:1 5799:2 5875:14 5957:1 6013:1 6238:4 6279:45 6319:4 6383:4 6423:2 6494:4 6510:1 6538:1 6631:1 6717:1 6741:4 6945:1 6994:2 7042:1 7309:1 7334:13 7342:20 7506:1 7529:28 7598:18 7619:1 7654:3 7689:1 7707:1 7793:2 7900:8 8093:1 8105:1 8233:1 8295:12 8334:4 8408:5 8412:3 8432:5 8501:1 8503:2 8537:1 8547:2 8640:1 8715:3 8771:12 8802:3 8817:1 8853:17 8977:2 8981:2 9149:4 9163:7 9219:7 9296:1 9314:12 9344:1 9596:1 9632:1 9646:1 9720:2 9749:1 9780:2 9845:2 9851:2 9896:2 9916:1 9925:6 9932:2 9994:1 10019:8 10064:5 10069:9 10276:1 10376:1 10384:2 10531:1 10592:3 10641:12 10646:2 10711:1 10725:13 10798:3 10873:3 10968:1 11051:3 11134:16 11183:7 11307:1 11478:3 11519:10 11623:24 11673:1 11696:1 11761:4 11800:1 11817:4 11848:3 11899:1 11901:7 11902:2 12129:1 12269:3 12411:1 12430:1 12435:1 12534:1 12566:1 12626:1 12687:3 12911:3 13229:2 13304:1 13350:2 13403:1 13429:2 13457:1 13474:1 13506:2 13739:1 13762:13 13792:1 13973:2 14253:1 14320:1 14459:2 14503:1 14569:1 14609:1 14628:4 14894:2 14949:2 14966:1 15001:1 15017:8 15028:1 15098:1 15348:5 15431:21 15592:6 15752:47 15802:1 15868:1 15875:1 15876:4 16046:2

Resources