added a scorer

This commit is contained in:
Martin Donnelly 2017-05-31 15:47:53 +01:00
parent c298955b62
commit 502f9dc1a2
5 changed files with 3324 additions and 191 deletions

View File

@ -2,27 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" readonly="true" id="c2fd5632-2143-4c7e-8b0d-96d7692b700b" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bayes.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/corpus.json" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/jobs-corpus.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/bayes.js" afterPath="$PROJECT_DIR$/bayes.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/jobs-special.js" afterPath="$PROJECT_DIR$/jobs-special.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/LICENSE" afterPath="$PROJECT_DIR$/node_modules/lodash/LICENSE" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/README.md" afterPath="$PROJECT_DIR$/node_modules/lodash/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/array.js" afterPath="$PROJECT_DIR$/node_modules/lodash/array.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/chain.js" afterPath="$PROJECT_DIR$/node_modules/lodash/chain.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/collection.js" afterPath="$PROJECT_DIR$/node_modules/lodash/collection.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/date.js" afterPath="$PROJECT_DIR$/node_modules/lodash/date.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/function.js" afterPath="$PROJECT_DIR$/node_modules/lodash/function.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/lang.js" afterPath="$PROJECT_DIR$/node_modules/lodash/lang.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/math.js" afterPath="$PROJECT_DIR$/node_modules/lodash/math.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/number.js" afterPath="$PROJECT_DIR$/node_modules/lodash/number.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/object.js" afterPath="$PROJECT_DIR$/node_modules/lodash/object.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/package.json" afterPath="$PROJECT_DIR$/node_modules/lodash/package.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/lodash/string.js" afterPath="$PROJECT_DIR$/node_modules/lodash/string.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/plugins/filter_location.js" afterPath="$PROJECT_DIR$/plugins/filter_location.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/plugins/filter_md_jobs.js" afterPath="$PROJECT_DIR$/plugins/filter_md_jobs.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/plugins/filter_reject.js" afterPath="$PROJECT_DIR$/plugins/filter_reject.js" />
</list>
<ignored path="rinser.iws" />
<ignored path=".idea/workspace.xml" />
@ -46,16 +30,109 @@
<splitter split-orientation="horizontal" split-proportion="0.5">
<split-first>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="stripped.json" pinned="false" current-in-tab="true">
<file leaf-file-name="stripped.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/stripped.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1241">
<caret line="0" column="2969" lean-forward="false" selection-start-line="0" selection-start-column="2958" selection-end-line="0" selection-end-column="2969" />
<state relative-caret-position="0">
<caret line="0" column="169" lean-forward="false" selection-start-line="0" selection-start-column="169" selection-end-line="0" selection-end-column="169" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="jobs-special.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/jobs-special.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="601">
<caret line="275" column="0" lean-forward="true" selection-start-line="275" selection-start-column="0" selection-end-line="275" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="jobs-corpus.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/jobs-corpus.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="186">
<caret line="329" column="0" lean-forward="true" selection-start-line="329" selection-start-column="0" selection-end-line="329" selection-end-column="0" />
<folding>
<marker date="1496241982005" expanded="true" signature="9345:9365" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="corpus.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/corpus.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="bayes.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/bayes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="765">
<caret line="47" column="30" lean-forward="true" selection-start-line="47" selection-start-column="30" selection-end-line="47" selection-end-column="30" />
<folding>
<element signature="e#0#44#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="corpus.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/corpus.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="1868" column="4" lean-forward="true" selection-start-line="1868" selection-start-column="4" selection-end-line="1868" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="jobs-special.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/jobs-special.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="93" column="30" lean-forward="true" selection-start-line="93" selection-start-column="30" selection-end-line="93" selection-end-column="30" />
<folding>
<marker date="1496241698997" expanded="true" signature="18235:21558" ph="..." />
<marker date="1496241698997" expanded="false" signature="18254:18272" ph="..." />
<marker date="1496241698997" expanded="false" signature="18299:18305" ph=" " />
<marker date="1496241698997" expanded="false" signature="18305:18311" ph=" " />
<marker date="1496241698997" expanded="false" signature="18311:18317" ph=" " />
<marker date="1496241698997" expanded="false" signature="18330:18348" ph="..." />
<marker date="1496241698997" expanded="false" signature="18384:18390" ph=" " />
<marker date="1496241698997" expanded="false" signature="18390:18396" ph=" " />
<marker date="1496241698997" expanded="false" signature="18396:18402" ph=" " />
<marker date="1496241698997" expanded="false" signature="19141:19147" ph=" " />
<marker date="1496241698997" expanded="false" signature="19310:19333" ph="..." />
<marker date="1496241698997" expanded="false" signature="19387:19393" ph=" " />
<marker date="1496241698997" expanded="false" signature="19577:19600" ph="..." />
<marker date="1496241698997" expanded="false" signature="19654:19660" ph=" " />
<marker date="1496241698997" expanded="false" signature="19840:19863" ph="..." />
<marker date="1496241698997" expanded="false" signature="19921:19927" ph=" " />
<marker date="1496241698997" expanded="false" signature="20116:20139" ph="..." />
<marker date="1496241698997" expanded="false" signature="20196:20202" ph=" " />
<marker date="1496241698997" expanded="false" signature="20376:20399" ph="..." />
<marker date="1496241698997" expanded="false" signature="20456:20462" ph=" " />
<marker date="1496241698997" expanded="false" signature="20651:20674" ph="..." />
<marker date="1496241698997" expanded="false" signature="20734:20740" ph=" " />
<marker date="1496241698997" expanded="false" signature="20926:20949" ph="..." />
<marker date="1496241698997" expanded="false" signature="21004:21010" ph=" " />
<marker date="1496241698997" expanded="false" signature="21229:21252" ph="..." />
<marker date="1496241698997" expanded="false" signature="21311:21317" ph=" " />
<marker date="1496241698997" expanded="false" signature="21393:21421" ph="..." />
<marker date="1496241698997" expanded="true" signature="21422:21541" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="good.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/good.json">
<provider selected="true" editor-type-id="text-editor">
@ -79,29 +156,11 @@
<file leaf-file-name="jobs-special.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/jobs-special.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="0" column="5800" lean-forward="true" selection-start-line="0" selection-start-column="5784" selection-end-line="0" selection-end-column="5800" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="RssBraider.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="11" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="filter_md_jobs.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/plugins/filter_md_jobs.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
<state relative-caret-position="0">
<caret line="0" column="19189" lean-forward="false" selection-start-line="0" selection-start-column="19189" selection-end-line="0" selection-end-column="19189" />
<folding>
<marker date="1496241698997" expanded="true" signature="0:1" ph="{&quot;title&quot;: &quot;Jobs&quot;...}" />
</folding>
</state>
</provider>
</entry>
@ -109,46 +168,20 @@
</leaf>
</split-first>
<split-second>
<splitter split-orientation="vertical" split-proportion="0.5">
<split-first>
<leaf>
<file leaf-file-name="good.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/dist/good.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="bad.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dist/bad.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</split-first>
<split-second>
<leaf>
<file leaf-file-name="bad.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/dist/bad.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="14" lean-forward="false" selection-start-line="0" selection-start-column="14" selection-end-line="0" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</split-second>
</splitter>
<leaf>
<file leaf-file-name="bayes.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/bayes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="83" column="7" lean-forward="true" selection-start-line="64" selection-start-column="2" selection-end-line="83" selection-end-column="7" />
<folding>
<element signature="e#0#44#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</split-second>
</splitter>
</component>
@ -164,7 +197,18 @@
<findStrings>
<find>logg</find>
<find>6DA9769BA89834AA</find>
<find>es6</find>
<find>nodejs</find>
<find>node</find>
<find>getstop</find>
<find>stripped</find>
<find>scot</find>
<find>html</find>
<find>processJson</find>
</findStrings>
<dirStrings>
<dir>C:\dev\md\Rinser</dir>
</dirStrings>
</component>
<component name="Git.Settings">
<option name="UPDATE_TYPE" value="MERGE" />
@ -173,8 +217,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/html/partials/list.ejs.js" />
<option value="$PROJECT_DIR$/html/ejs/list.ejs" />
<option value="$PROJECT_DIR$/html/ejs/test.ejs" />
<option value="$PROJECT_DIR$/html/feeds.html" />
<option value="$PROJECT_DIR$/html/css/cards.css" />
@ -215,15 +257,17 @@
<option value="$PROJECT_DIR$/reader.js" />
<option value="$PROJECT_DIR$/news.js" />
<option value="$PROJECT_DIR$/lifestyle.js" />
<option value="$PROJECT_DIR$/bayes.js" />
<option value="$PROJECT_DIR$/dist/stripped.json" />
<option value="$PROJECT_DIR$/plugins/filter_location.js" />
<option value="$PROJECT_DIR$/plugins/filter_md_jobs.js" />
<option value="$PROJECT_DIR$/plugins/filter_reject.js" />
<option value="$PROJECT_DIR$/jobs-special.js" />
<option value="$PROJECT_DIR$/dist/jobs-special.json" />
<option value="$PROJECT_DIR$/dist/bad.json" />
<option value="$PROJECT_DIR$/dist/good.json" />
<option value="$PROJECT_DIR$/jobs-special.js" />
<option value="$PROJECT_DIR$/bayes.js" />
<option value="$PROJECT_DIR$/dist/corpus.json" />
<option value="$PROJECT_DIR$/dist/jobs-special.json" />
<option value="$PROJECT_DIR$/jobs-corpus.js" />
</list>
</option>
</component>
@ -263,8 +307,8 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<PATH>
@ -277,20 +321,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="rinser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Rinser" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="plugins" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="rinser" />
@ -338,18 +368,19 @@
<property name="nodejs_interpreter_path" value="$USER_HOME$/.nvm/versions/node/v5.7.0/bin/node" />
<property name="list.type.of.created.stylesheet" value="SCSS" />
<property name="com.intellij.ide.scratch.LRUPopupBuilder$2/Languages" value="TEXT" />
<property name="add_unversioned_files" value="$PROJECT_DIR$/dist/jobs-special.json" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\mddev\Rinser\dist" />
<recent name="C:\mddev\Rinser\html" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\dev\md\Rinser" />
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/dist" />
<recent name="$PROJECT_DIR$/html/icons" />
<recent name="C:\mddev\Rinser\dist" />
<recent name="C:\mddev\Rinser\html" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\mddev\Rinser\dist" />
<recent name="C:\mddev\Rinser\html" />
</key>
</component>
<component name="RunDashboard">
@ -522,6 +553,7 @@
<workItem from="1487021424879" duration="602000" />
<workItem from="1491947971318" duration="437000" />
<workItem from="1495111050519" duration="4793000" />
<workItem from="1496238287904" duration="3750000" />
</task>
<task id="LOCAL-00022" summary="Updating to Version 3">
<created>1458043875334</created>
@ -870,25 +902,24 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="70946000" />
<option name="totallyTimeSpent" value="74696000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33368757" sideWeight="0.353562" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.36164382" sideWeight="0.46860158" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33333334" sideWeight="0.646438" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.004109589" sideWeight="0.46860158" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32896176" sideWeight="0.4838976" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Gulp" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18936035" sideWeight="0.33425033" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18936035" sideWeight="0.66574967" order="0" side_tool="false" content_ui="combo" />
<window_info id="Gulp" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.18936035" sideWeight="0.3410959" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18936035" sideWeight="0.65890414" order="0" side_tool="false" content_ui="combo" />
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Atlassian " active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="SonarLint" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Atlassian " active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3281106" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3997773" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3997773" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@ -897,7 +928,7 @@
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="GitLabIntegration" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3281106" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="SonarLint" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="SonarQube" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32962137" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
@ -926,6 +957,32 @@
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="1" />
<option value="2" />
<option value="3" />
</list>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
@ -980,22 +1037,6 @@
</option>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/html/news.json" />
<entry file="file://$PROJECT_DIR$/dist/news.json" />
<entry file="file://$PROJECT_DIR$/feeds/news.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="77">
<caret line="64" column="5" lean-forward="false" selection-start-line="64" selection-start-column="5" selection-end-line="64" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="572">
<caret line="69" column="23" lean-forward="false" selection-start-line="42" selection-start-column="6" selection-end-line="69" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1425">
@ -1179,7 +1220,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -1188,7 +1228,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="14" column="17" lean-forward="false" selection-start-line="14" selection-start-column="17" selection-end-line="14" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
@ -1196,7 +1235,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1037">
<caret line="61" column="5" lean-forward="false" selection-start-line="61" selection-start-column="5" selection-end-line="61" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
@ -1204,7 +1242,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -1212,7 +1249,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="186" column="16" lean-forward="false" selection-start-line="186" selection-start-column="16" selection-end-line="186" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
@ -1220,18 +1256,63 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="22" lean-forward="false" selection-start-line="3" selection-start-column="22" selection-end-line="3" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/rss-braider/lib/RssBraider.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<state relative-caret-position="187">
<caret line="11" column="4" lean-forward="false" selection-start-line="11" selection-start-column="4" selection-end-line="11" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_location.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="39" lean-forward="false" selection-start-line="1" selection-start-column="39" selection-end-line="1" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_reject.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="387" lean-forward="false" selection-start-line="1" selection-start-column="387" selection-end-line="1" selection-end-column="387" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_md_jobs.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/stripped.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="169" lean-forward="false" selection-start-line="0" selection-start-column="169" selection-end-line="0" selection-end-column="169" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/good.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/bad.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="14" lean-forward="false" selection-start-line="0" selection-start-column="14" selection-end-line="0" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/jsonfile/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
@ -1240,76 +1321,93 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/jobs-special.json">
<entry file="file://$PROJECT_DIR$/dist/jobs-special.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="0" column="5800" lean-forward="true" selection-start-line="0" selection-start-column="5784" selection-end-line="0" selection-end-column="5800" />
<folding />
<state relative-caret-position="102">
<caret line="93" column="30" lean-forward="true" selection-start-line="93" selection-start-column="30" selection-end-line="93" selection-end-column="30" />
<folding>
<marker date="1496241698997" expanded="true" signature="18235:21558" ph="..." />
<marker date="1496241698997" expanded="false" signature="18254:18272" ph="..." />
<marker date="1496241698997" expanded="false" signature="18299:18305" ph=" " />
<marker date="1496241698997" expanded="false" signature="18305:18311" ph=" " />
<marker date="1496241698997" expanded="false" signature="18311:18317" ph=" " />
<marker date="1496241698997" expanded="false" signature="18330:18348" ph="..." />
<marker date="1496241698997" expanded="false" signature="18384:18390" ph=" " />
<marker date="1496241698997" expanded="false" signature="18390:18396" ph=" " />
<marker date="1496241698997" expanded="false" signature="18396:18402" ph=" " />
<marker date="1496241698997" expanded="false" signature="19141:19147" ph=" " />
<marker date="1496241698997" expanded="false" signature="19310:19333" ph="..." />
<marker date="1496241698997" expanded="false" signature="19387:19393" ph=" " />
<marker date="1496241698997" expanded="false" signature="19577:19600" ph="..." />
<marker date="1496241698997" expanded="false" signature="19654:19660" ph=" " />
<marker date="1496241698997" expanded="false" signature="19840:19863" ph="..." />
<marker date="1496241698997" expanded="false" signature="19921:19927" ph=" " />
<marker date="1496241698997" expanded="false" signature="20116:20139" ph="..." />
<marker date="1496241698997" expanded="false" signature="20196:20202" ph=" " />
<marker date="1496241698997" expanded="false" signature="20376:20399" ph="..." />
<marker date="1496241698997" expanded="false" signature="20456:20462" ph=" " />
<marker date="1496241698997" expanded="false" signature="20651:20674" ph="..." />
<marker date="1496241698997" expanded="false" signature="20734:20740" ph=" " />
<marker date="1496241698997" expanded="false" signature="20926:20949" ph="..." />
<marker date="1496241698997" expanded="false" signature="21004:21010" ph=" " />
<marker date="1496241698997" expanded="false" signature="21229:21252" ph="..." />
<marker date="1496241698997" expanded="false" signature="21311:21317" ph=" " />
<marker date="1496241698997" expanded="false" signature="21393:21421" ph="..." />
<marker date="1496241698997" expanded="true" signature="21422:21541" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/jobs-special.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="16" column="47" lean-forward="true" selection-start-line="16" selection-start-column="47" selection-end-line="16" selection-end-column="47" />
<state relative-caret-position="601">
<caret line="275" column="0" lean-forward="true" selection-start-line="275" selection-start-column="0" selection-end-line="275" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_location.js">
<entry file="file://$PROJECT_DIR$/dist/jobs-special.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="39" lean-forward="false" selection-start-line="1" selection-start-column="39" selection-end-line="1" selection-end-column="39" />
<state relative-caret-position="0">
<caret line="0" column="19189" lean-forward="false" selection-start-line="0" selection-start-column="19189" selection-end-line="0" selection-end-column="19189" />
<folding>
<marker date="1496241698997" expanded="true" signature="0:1" ph="{&quot;title&quot;: &quot;Jobs&quot;...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/corpus.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="1868" column="4" lean-forward="true" selection-start-line="1868" selection-start-column="4" selection-end-line="1868" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/bayes.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="510">
<caret line="53" column="44" lean-forward="false" selection-start-line="53" selection-start-column="44" selection-end-line="53" selection-end-column="44" />
<state relative-caret-position="765">
<caret line="47" column="30" lean-forward="true" selection-start-line="47" selection-start-column="30" selection-end-line="47" selection-end-column="30" />
<folding>
<element signature="e#0#44#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_reject.js">
<entry file="file://$PROJECT_DIR$/jobs-corpus.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="387" lean-forward="false" selection-start-line="1" selection-start-column="387" selection-end-line="1" selection-end-column="387" />
<folding />
<state relative-caret-position="186">
<caret line="329" column="0" lean-forward="true" selection-start-line="329" selection-start-column="0" selection-end-line="329" selection-end-column="0" />
<folding>
<marker date="1496241982005" expanded="true" signature="9345:9365" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/plugins/filter_md_jobs.js">
<entry file="file://$PROJECT_DIR$/corpus.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/stripped.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1241">
<caret line="0" column="2969" lean-forward="false" selection-start-line="0" selection-start-column="2958" selection-end-line="0" selection-end-column="2969" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/bad.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dist/good.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>

View File

@ -10,6 +10,7 @@ let jsonfile = require('jsonfile');
var striptags = require('striptags');
let strippedArray = [];
let corpus = {};
function getNoneStopWords(sentence) {
var common = getStopWords();
@ -58,6 +59,43 @@ function processFile(data) {
}
function buildCorpus() {
console.log('buildCorpus');
console.log(strippedArray.length);
let fileName = ".\\dist\\corpus.json";
for(let i of strippedArray) {
//console.log(i);
for(let t of i) {
//console.log(t);
if (!corpus.hasOwnProperty(t)) {
corpus[t] = {score:0, common:1};
} else {
corpus[t].common++;
}
}
}
jsonfile.writeFile(fileName, corpus,function(err, obj) {
console.error(err);
console.log(obj);
});
}
function loadCorpus() {
let fileName = ".\\dist\\corpus.json";
console.log(fileName);
let data = jsonfile.readFile(fileName, function(err, obj) {
corpus = obj;
buildCorpus();
});
}
function go() {
//let fileName = __dirname + "\\dist\\" + outputFile + ".json";
@ -66,6 +104,7 @@ console.log(fileName);
let data = jsonfile.readFile(fileName, function(err, obj) {
processFile(obj);
loadCorpus();
});
}

2650
corpus.json Normal file

File diff suppressed because it is too large Load Diff

351
jobs-corpus.js Normal file
View File

@ -0,0 +1,351 @@
var outputFile = 'jobs-special', RssBraider = require('rss-braider'), fs = require(
'fs'), ejs = require('ejs'), read = require('fs').readFileSync, join = require(
'path').join, str = read(join(__dirname, '/templates/rss.ejs'),
'utf8'), feeds = {};
var log4js = require('log4js');
var logger = log4js.getLogger();
const stopwords = require('stopwords-en');
var striptags = require('striptags');
let jsonfile = require('jsonfile');
let strippedArray = [];
let corpus = {};
// Pull feeds from config files:
// feeds.simple_test_feed = require("./config/feed").feed;
// Or define in-line
feeds.simple_test_feed = {
"feed_name": "feed", "default_count": 1, "no_cdata_fields": [], // Don't wrap these fields in CDATA tags
"plugins": [
'filter_location', 'filter_reject', 'filter_md_jobs', 'filter_today_only'
/*'filter_location', 'filter_today_only'*/
], "meta": {
"title": "Jobs",
"description": "Combined Jobs Feed",
'site_url': 'http://pipes.silvrtree.co.uk/jobs-special.xml'
}, "sources": [
{
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/BAEBF3BDF82B8FEF.rss",
"page": "https://www.jobserve.com/gb/en/JobSearch.aspx?shid=A7ACEE7915E274717C"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=47820652"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/6DA9769BA89834AA.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.JobServe.com/MySearch/EDF47BEA6B31EF.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.JobServe.com/MySearch/3CAD044BEF2BFA.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.JobServe.com/MySearch/C7B25D86D0844A.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.JobServe.com/MySearch/64A3EEF615FA4C.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564698"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21564712"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=21942123"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33166238"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888173"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/m7dp711z2r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/pfvf7o7z2r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/lluqnt8z2r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/tu33qt8z2r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/u3btnz8z2r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33256062"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=33450169"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34517029"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.purelyit.co.uk/cgi-bin/advsearch?rss_feed=1&daysback=1&jbe_id=34888105"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.technojobs.co.uk/rss.php/glasgow/searchtypeand/locationScotland/sortbyrelevant/jobtypeall"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=London&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CO_LONDON&compare_search=London&search_emp_mkt_cd=ALL"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Glasgow&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=TO_G1_GLASGOW&compare_search=Glasgow&search_emp_mkt_cd=ALL"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&search_emp_mkt_cd=ALL"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html%20,%20asp%20,%20web%20,%20sql%20,%20delphi%20,%20vb%20,%20vbscript%20,%20php%20,%20ajax%20,%20mysql%20,%20sqlserver%20,%20javascript%20,%20intranet%20,%20vmware%20,%20virtulization&location_include=Germany&location_within=10&reqd_salary=ANY|&daysback=7&scc=UK&compare_resolved=CY_GERMANY&compare_search=Germany&search_emp_mkt_cd=ALL"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/b1d7e6c3a9a11964z3r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/CA49421A86CA3F74.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/ddeded091b6f6d33z3r.xml"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.s1jobs.com/xml/3eafc1ea20f1ca02z3r.xml"
}
]
};
var braider_options = {
feeds: feeds,
indent: " ",
date_sort_order: "desc", // Newest first
log_level: "warn",
dedupe_fields: ['link', 'guid'],
plugins_directories: [__dirname + "/plugins/"]
};
console.log('Working..');
var rss_braider = RssBraider.createClient(braider_options);
// Override logging level (debug, info, warn, err, off)
rss_braider.logger.level('error');
rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
if (err) {
return console.log(err);
}
var j = JSON.parse(data);
j = processJson(j);
/*for (let mm in j) {
console.log(mm);
}*/
var ejsOutput = ejs.compile(str)(j);
fs.writeFile(__dirname + "/dist/" + outputFile + ".html",
ejsOutput,
function(err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
fs.writeFile(__dirname + "/dist/" + outputFile + ".json",
data,
function(err) {
if (err) {
logger.error(err);
return console.log(err);
}
console.log("The file was saved!");
});
});
function scoreEntry(s) {
let score = 0;
let used = [];
for(let t of s) {
//console.log(t);
if (!corpus.hasOwnProperty(t)) {
corpus[t] = {score:0, common:1};
} else {
corpus[t].common++;
if (used.indexOf(t) === -1) {
score = score + corpus[t].score;
used.push(t);
}
}
}
return score;
}
function processJson(j) {
console.log(j);
for (let item of j.items) {
console.log(item.title);
let description = striptags(item.description);
let stripped = getNoneStopWords(description);
//console.log(stripped);
let score = scoreEntry(stripped);
console.log(`Score ${score}`);
item.description = `<div style='color:red;weight:900'>Score ${score}</div>` + item.description;
}
return j;
}
function getNoneStopWords(sentence) {
let common = getStopWords();
let wordArr = sentence.match(/\w+/g),
commonObj = {},
uncommonArr = [],
word, i;
for (i = 0; i < common.length; i++) {
commonObj[ common[i].trim() ] = true;
}
for (i = 0; i < wordArr.length; i++) {
word = wordArr[i].trim().toLowerCase();
if (!commonObj[word]) {
uncommonArr.push(word);
}
}
return uncommonArr;
}
function getStopWords() {
return stopwords;
}
function doFeeds() {
rss_braider.processFeed('simple_test_feed', 'rss', function(err, data) {
if (err) {
return console.log(err);
}
console.log('Saving', __dirname + "/dist/" + outputFile + ".xml");
fs.writeFile(__dirname + "/dist/" + outputFile + ".xml", data, function(err) {
if (err) {
return console.log(err);
}
console.log("The file was saved!");
});
});
}
function loadCorpus() {
let fileName = ".\\dist\\corpus.json";
console.log(fileName);
jsonfile.readFile(fileName, function(err, obj) {
corpus = obj;
doFeeds();
});
}
function saveCorpus() {
let fileName = ".\\dist\\corpus.json";
jsonfile.writeFile(fileName, corpus,function(err, obj) {
console.error(err);
console.log(obj);
});
}
function go() {
loadCorpus();
}
go();

View File

@ -137,11 +137,6 @@ feeds.simple_test_feed = {
"count": 100,
"feed_url": "http://www.jobserve.com/MySearch/6FC7E9ED5F042ECB.rss"
},
{
/* "name" : "JobServe",*/
"count": 100,
"feed_url": "http://www.jobsite.co.uk/cgi-bin/advsearch?rss_feed=1&skill_atleast=html,%20asp,%20web,%20sql,%20delphi,%20vb,%20vbscript,%20php,%20ajax,%20mysql,%20sqlserver,%20javascript,%20intranet,%20vmware,%20virtulization&location_include=Abu%20Dhabi&compare_resolved=RE_ABUDHABI_UNITEDARABEMIRATES&compare_search=Abu%20Dhabi&jobtype=X&search_emp_mkt_cd=ALL"
},
{
/* "name" : "JobServe",*/
"count": 100,
@ -237,8 +232,8 @@ rss_braider.processFeed('simple_test_feed', 'json', function(err, data) {
});
function getNoneStopWords(sentence) {
var common = getStopWords();
var wordArr = sentence.match(/\w+/g),
let common = getStopWords();
let wordArr = sentence.match(/\w+/g),
commonObj = {},
uncommonArr = [],
word, i;