Skip to content

Instantly share code, notes, and snippets.

View h8nor's full-sized avatar

h8nor

  • GPG: 0xB5DE5869
View GitHub Profile
@h8nor
h8nor / PorterStemmer.bas
Last active May 26, 2020 18:10
Porter Stemmer RUS in VISUAL BASIC 6
' It follow the algorithm "stem_Unicode.sbl" definition presented in:
' Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, no. 3,
' pp 130-137, (http://snowball.tartarus.org/algorithms/russian/stemmer.html)
' TO USE THE PROGRAM CALL THE FUNCTION PORTERSTEMMERRU.
' THE WORD TO BE STEMMED SHOULD BE PASSED AS THE ARGUEMENT.
' THE STRING RETURNED BY THE FUNCTION IS THE STEMMED WORD.
Option Explicit
Option Base 0
@h8nor
h8nor / Square_root.bas
Last active April 19, 2019 14:08
Calculating the square root of a natural number
Option Explicit
'12345678901234567890123456789012345bopoh13@ya67890123456789012345678901234567890
Function Square_root_Diophantine(ByVal Square_number As Long) As Currency
Dim Number As Integer: Const Rank_places As Long = 10 ^ 2
Do While Square_number > Number
Number = Number + 1
Square_number = Square_number - 2 * Number
Loop: Square_root_Diophantine = Number ' Square_root for N