Snowball (programming language): Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
remove red link; Lovins article is enough
 
imported>Kylras
 
Line 8: Line 8:
The name Snowball was chosen as a tribute to the [[SNOBOL]] programming language, "with which it shares the concept of string patterns delivering signals that are used to control the flow of the program."<ref name=":0" /> The creator of Snowball, [[Martin Porter|Dr. Martin Porter]], "toyed with the idea of calling it 'strippergram,'" because it "effectively provides a 'suffix STRIPPER GRAMmar.'"<ref name=Snowball-HomePage/>
The name Snowball was chosen as a tribute to the [[SNOBOL]] programming language, "with which it shares the concept of string patterns delivering signals that are used to control the flow of the program."<ref name=":0" /> The creator of Snowball, [[Martin Porter|Dr. Martin Porter]], "toyed with the idea of calling it 'strippergram,'" because it "effectively provides a 'suffix STRIPPER GRAMmar.'"<ref name=Snowball-HomePage/>


The Snowball compiler translates a Snowball script (an .sbl file) into program in [[thread safety|thread-safe]] [[ANSI C]], [[Java (programming language)|Java]], Ada, C#, Go, Javascript, Object Pascal, Python or Rust.<ref name=":1">{{Cite web |last=Porter |first=Martin |title=Snowball: Quick introduction |url=http://snowball.tartarus.org/texts/quickintro.html |access-date=May 4, 2025}}</ref><ref name=":2">{{Cite web |date=March 27, 2025 |title=Snowball README |url=https://github.com/snowballstem/snowball# |access-date=May 4, 2025}}</ref> For ANSI C, each Snowball script produces a program file and corresponding header file (with  .c  and  .h  extensions).<ref name=":1" /> The Snowball compiler checks the consistency of its script, and this check was used to discover a [[typo]] in a seminal academic paper by [[Julie Beth Lovins|Lovins]] which had remained undetected for 30 years.<ref>{{Cite web|url=http://snowball.tartarus.org/algorithms/lovins/festschrift.html|title=Lovins revisited|website=snowball.tartarus.org |author1=Martin Porter |access-date=6 August 2024 |date=December 2001}}</ref>
The Snowball [[compiler]] translates a Snowball script (an .sbl file) into program in [[thread safety|thread-safe]] [[ANSI C]], [[Java (programming language)|Java]], Ada, C#, Go, [[JavaScript|Javascript]], [[Object Pascal]], Python or Rust.<ref name=":1">{{Cite web |last=Porter |first=Martin |title=Snowball: Quick introduction |url=http://snowball.tartarus.org/texts/quickintro.html |access-date=May 4, 2025}}</ref><ref name=":2">{{Cite web |date=March 27, 2025 |title=Snowball README |url=https://github.com/snowballstem/snowball# |access-date=May 4, 2025}}</ref> For ANSI C, each Snowball script produces a program file and corresponding header file (with  .c  and  .h  extensions).<ref name=":1" /> The Snowball compiler checks the consistency of its script, and this check was used to discover a [[typo]] in a seminal academic paper by [[Julie Beth Lovins|Lovins]] which had remained undetected for 30 years.<ref>{{Cite web|url=http://snowball.tartarus.org/algorithms/lovins/festschrift.html|title=Lovins revisited|website=snowball.tartarus.org |author1=Martin Porter |access-date=6 August 2024 |date=December 2001}}</ref>


The basic [[datatype]]s handled by Snowball are strings of characters, signed integers, and boolean [[truth value]]s, or more simply strings, integers and booleans. Snowball's characters are either 8-bit wide, or 16-bit, depending on the mode of use. In particular, both [[ASCII]] and [[UTF-16|16-bit Unicode]] are supported.<ref name=":0" /> Like the [[SNOBOL programming language]], the flow of control in Snowball is arranged by the implicit use of signals (each statement returns a true or false value), rather than the explicit use of constructs such as if, then, and break found in [[C (programming language)|C]] and many other programming languages.<ref name=":0">[http://snowball.tartarus.org/compiler/snowman.html "Snowball Manual"], Martin Porter, web page. Retrieved 2 September 2014.</ref>
The basic [[datatype]]s handled by Snowball are strings of characters, signed integers, and boolean [[truth value]]s, or more simply strings, integers and booleans. Snowball's characters are either 8-bit wide, or 16-bit, depending on the mode of use. In particular, both [[ASCII]] and [[UTF-16|16-bit Unicode]] are supported.<ref name=":0" /> Like the [[SNOBOL programming language]], the flow of control in Snowball is arranged by the implicit use of signals (each statement returns a true or false value), rather than the explicit use of constructs such as if, then, and break found in [[C (programming language)|C]] and many other programming languages.<ref name=":0">[http://snowball.tartarus.org/compiler/snowman.html "Snowball Manual"], Martin Porter, web page. Retrieved 2 September 2014.</ref>

Latest revision as of 19:29, 30 June 2025

Template:Short description Script error: No such module "Distinguish". Script error: No such module "Unsubst". Script error: No such module "Unsubst".

Snowball is a small string processing programming language designed for creating stemming algorithms for use in information retrieval.[1]

The name Snowball was chosen as a tribute to the SNOBOL programming language, "with which it shares the concept of string patterns delivering signals that are used to control the flow of the program."[2] The creator of Snowball, Dr. Martin Porter, "toyed with the idea of calling it 'strippergram,'" because it "effectively provides a 'suffix STRIPPER GRAMmar.'"[1]

The Snowball compiler translates a Snowball script (an .sbl file) into program in thread-safe ANSI C, Java, Ada, C#, Go, Javascript, Object Pascal, Python or Rust.[3][4] For ANSI C, each Snowball script produces a program file and corresponding header file (with .c and .h extensions).[3] The Snowball compiler checks the consistency of its script, and this check was used to discover a typo in a seminal academic paper by Lovins which had remained undetected for 30 years.[5]

The basic datatypes handled by Snowball are strings of characters, signed integers, and boolean truth values, or more simply strings, integers and booleans. Snowball's characters are either 8-bit wide, or 16-bit, depending on the mode of use. In particular, both ASCII and 16-bit Unicode are supported.[2] Like the SNOBOL programming language, the flow of control in Snowball is arranged by the implicit use of signals (each statement returns a true or false value), rather than the explicit use of constructs such as if, then, and break found in C and many other programming languages.[2]

Though the original Snowball website maintained by Dr. Martin Porter and colleague Richard Boulton has been closed since 2014 following Dr. Porter’s retirement,[1][4][6] the site itself is still accessible, and the language continues to be developed as a community project on GitHub.[1][4] Additionally, large projects like the Natural Language Toolkit (NLTK) for Python employ Snowball along with stemming algorithms designed by Dr. Porter and other contributors to the Snowball language.[7][8]

References

Template:Reflist

External links


  1. REDIRECT Template:Prog-lang-stub

Template:R shell

  1. a b c d "Snowball", Martin Porter, web page. Retrieved 2 September 2014.
  2. a b c "Snowball Manual", Martin Porter, web page. Retrieved 2 September 2014.
  3. a b Script error: No such module "citation/CS1".
  4. a b c Script error: No such module "citation/CS1".
  5. Script error: No such module "citation/CS1".
  6. Script error: No such module "citation/CS1".
  7. Script error: No such module "citation/CS1".
  8. Script error: No such module "citation/CS1".