Skip to content

Commit

Permalink
Fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mo committed Oct 21, 2015
1 parent 2e9b981 commit 8ce3fe7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contributors.
## Making Changes ##

* Create a topic branch for your fork to which you commit your work
* Please avoid commiting changes to your master branch as it risks mixing
* Please avoid committing changes to your master branch as it risks mixing
code for unrelated fixes which makes merging the changes back to the
main brat repository more difficult
* Make commits for small logical units of code and resources
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ brat does this by:
"Put all your eggs in one basket, and then guard that basket!")
* Present text as it would appear to a reader and maintain annotations close
to the text
* Zero set-up for annotators, leave configurations and server/data maintainence
* Zero set-up for annotators, leave configurations and server/data maintenance
to other staff

## License ##
Expand Down
4 changes: 2 additions & 2 deletions server/lib/altnamedtuple.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def namedtuple(typename, field_names, verbose=False, rename=False):
>>> x, y = p # unpack like a regular tuple
>>> x, y
(11, 22)
>>> p.x + p.y # fields also accessable by name
>>> p.x + p.y # fields also accessible by name
33
>>> d = p._asdict() # convert to a dictionary
>>> d['x']
Expand Down Expand Up @@ -104,7 +104,7 @@ def __getnewargs__(self):
result = namespace[typename]

# For pickling to work, the __module__ variable needs to be set to the frame
# where the named tuple is created. Bypass this step in enviroments where
# where the named tuple is created. Bypass this step in environments where
# sys._getframe is not defined (Jython for example) or sys._getframe is not
# defined for arguments greater than 0 (IronPython).
try:
Expand Down
4 changes: 2 additions & 2 deletions server/src/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def get_new_id(self, prefix, suffix=None):
#XXX: Stupid and linear
if suffix is None:
suffix = ''
#XXX: Arbitary constant!
#XXX: Arbitrary constant!
for suggestion in (prefix + unicode(i) + suffix for i in xrange(1, 2**15)):
# This is getting more complicated by the minute, two checks since
# the developers no longer know when it is an id or string.
Expand Down Expand Up @@ -786,7 +786,7 @@ def _parse_equiv_annotation(self, dummy, data, data_tail, input_file_path):
equivs = type_tail.split(None)
return EquivAnnotation(type, equivs, data_tail, source_id=input_file_path)

# Parse an old modifier annotation for back-wards compability
# Parse an old modifier annotation for backwards compatibility
def _parse_modifier_annotation(self, id, data, data_tail, input_file_path):
type, target = data.split()
return AttributeAnnotation(target, id, type, data_tail, True, source_id=input_file_path)
Expand Down
2 changes: 1 addition & 1 deletion server/src/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def backup(min_interval=MIN_INTERVAL, backup_dir=BACKUP_DIR, data_dir=DATA_DIR):
if backup_dir is None:
return

#XXX: The timeout is arbitary but dependant on the back-up, should we start
#XXX: The timeout is arbitrary but dependent on the back-up, should we start
# with a sane default and then refer to how long the last back-up
# took?
backup_lock = join_path(DATA_DIR, '.backup.lock')
Expand Down
2 changes: 1 addition & 1 deletion server/src/mecab.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def token_offsets_gen(text):

# Wakati inserts spaces, but only after non-space tokens.
# We find these iteratively and then allow additional spaces to be treated
# as seperate tokens.
# as separate tokens.

# XXX: MeCab rapes newlines by removing them, we need to align ourselves
last_end = 0
Expand Down
2 changes: 1 addition & 1 deletion server/src/projectconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def __init__(self, terms, args=[]):

def argument_minimum_count(self, arg):
"""
Returns the minumum number of times the given argument is
Returns the minimum number of times the given argument is
required to appear for this type.
"""
return self.arg_min_count.get(arg, 0)
Expand Down
6 changes: 3 additions & 3 deletions server/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from thread import allocate_lock

### Constants
# This handling of version_info is strictly for backwards compability
# This handling of version_info is strictly for backwards compatibility
PY_VER_STR = '%d.%d.%d-%s-%d' % tuple(version_info)
REQUIRED_PY_VERSION = (2, 5, 0, 'alpha', 1)
REQUIRED_PY_VERSION_STR = '%d.%d.%d-%s-%d' % tuple(REQUIRED_PY_VERSION)
Expand Down Expand Up @@ -78,7 +78,7 @@ def _miss_config_msg():
) % (CONF_FNAME, CONF_TEMPLATE_FNAME, CONF_FNAME,
CONF_TEMPLATE_FNAME, CONF_FNAME)

# Check for existance and sanity of the configuration
# Check for existence and sanity of the configuration
def _config_check():
from message import Messager

Expand Down Expand Up @@ -276,7 +276,7 @@ def serve(params, client_ip, client_hostname, cookie_data):
# Do we have a Python version compatibly with our libs?
if (version_info[0] != REQUIRED_PY_VERSION[0] or
version_info < REQUIRED_PY_VERSION):
# Bail with hand-writen JSON, this is very fragile to protocol changes
# Bail with hand-written JSON, this is very fragile to protocol changes
return cookie_hdrs, ((JSON_HDR, ),
('''
{
Expand Down
4 changes: 2 additions & 2 deletions server/src/ssplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _text_by_offsets_gen(text, offsets):
ret = [o for o in jp_sentence_boundary_gen(sentence)]
ans = [(1, 5), (6, 12), (12, 15), (16, 18)]
assert ret == ans, '%s != %s' % (ret, ans)
print 'Succesful!'
print 'Successful!'

sentence = ' One of these days Jimmy, one of these days. Boom! Kaboom '
print 'Sentence:', sentence
Expand All @@ -191,4 +191,4 @@ def _text_by_offsets_gen(text, offsets):
ret = [o for o in en_sentence_boundary_gen(sentence)]
ans = [(1, 44), (45, 50), (51, 57)]
assert ret == ans, '%s != %s' % (ret, ans)
print 'Succesful!'
print 'Successful!'

0 comments on commit 8ce3fe7

Please sign in to comment.