-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b903177
commit 58b9272
Showing
74 changed files
with
21,304 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
module Keyphrase::Stoplist | ||
class << self | ||
# Class variable to store filenames | ||
@@file_names = [] | ||
|
||
# Method to retrieve the array of filenames | ||
def languages | ||
@@file_names | ||
end | ||
end | ||
|
||
# Dynamically require all files in the stoplist directory | ||
Dir[File.join(__dir__, 'stoplist', '*.rb')].each do |file| | ||
require_relative file | ||
@@file_names << File.basename(file, '.rb').to_sym | ||
end | ||
|
||
def self.stopwords lang, type=:smart | ||
def self.stopwords_for_lang lang | ||
cl = const_get(lang.to_s.capitalize) | ||
|
||
if type == :strict | ||
cl.strict | ||
else | ||
cl.smart | ||
end | ||
end | ||
|
||
def self.stoplist_classes | ||
constants.map { |const| } | ||
cl.stopwords | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class Keyphrase | ||
module Stoplist | ||
class Afr | ||
def self.stopwords | ||
@@stopwords ||= %w{ | ||
'n aan af al as baie by daar dag dat die dit een ek | ||
en gaan gesê haar het hom hulle hy in is jou jy kan | ||
kom ma maar met my na nie om ons op saam sal se sien | ||
so sy te toe uit van vir was wat ʼn | ||
} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Keyphrase | ||
module Stoplist | ||
class Aka | ||
def self.stopwords | ||
@@stopwords ||= %w{ | ||
} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class Keyphrase | ||
module Stoplist | ||
class Amh | ||
def self.stopwords | ||
@@stopwords ||= [ | ||
] | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.