Word boundary что это

Обновлено: 06.07.2024

I see this word, hear this word, feel this word everywhere.

expand_more Я вижу это слово, слышу это слово, чувствую это слово повсюду.

Select a suggested word from the list to replace the misspelled word.

Выберите нужное слово из списка, чтобы заменить слово с ошибкой.

Previous word: Click this button to find the previous instance of a word or term in your document.

Предыдущее слово: поиск предыдущего вхождения слова или фразы в документе.

I see this word, hear this word, feel this word everywhere.

expand_more Я вижу это слово, слышу это слово, чувствую это слово повсюду.

Select a suggested word from the list to replace the misspelled word.

Выберите нужное слово из списка, чтобы заменить слово с ошибкой.

Previous word: Click this button to find the previous instance of a word or term in your document.

Предыдущее слово: поиск предыдущего вхождения слова или фразы в документе.

words

And for another, deciding what words are good and what words are bad is actually not very easy.

expand_more А с другой – решать какие слова хорошие, а какие слова плохие, вообще-то, не очень легко.

CA: But words, saying things, you know, can be constructive; it can be really damaging.

Крис А: Но слова, свобода слова она может быть конструктивной.

The OR operatorGoogle's default behavior is to consider all the words in a search.

Оператор ORПо умолчанию Google учитывает все слова в запросе.

wording

Переводы

файл Word

Примеры использования

English Russian Контекстуальные примеры "word" в русско

Данные предложения взяты с внешних ресурсов и могут быть неточными. bab.la не несёт ответственность за их содержание.

Now, you know when you learn a new word, and then you start to see that word everywhere?

Знаете, когда вы узнаете новое слово, вы начинаете встречать это слово повсюду?

And I want to introduce a word that I think is very useful, which is stacking.

А затем я введу понятие, которое мне кажется очень полезным — это термин "суммирование".

That same word, "normal," had two different, almost opposite meanings.

Одно и то же слово «нормальный» имеет два разных, почти противоположных значения.

It's said to be the most successful ever invention of a word by a known individual.

Это считается самым удачным словом, которое когда-либо было придумано отдельным человеком.

And this is all being done one word at a time by just people typing CAPTCHAs on the Internet.

И всё это делается по слову за раз, просто людьми, вводящими капчи в интернете.

You know, they are generally put together in pairs, creating a word or what we call base pairs.

Обычно, они ставятся парами, создавая слово, или, как мы их называем, пару основ.

Use the find bar to locate a specific word or phrase on a webpage.

Для поиска на странице нужного слова или словосочетания используйте панель поиска.

You can define a particular word or phrase from within your document.

Вы можете дать определение отдельному слову или словосочетанию в документе.

So, he took the Greek word "mimeme," which means that which is imitated.

Он использовал греческое слово «мимем», означающее то, что копируется.

Then, type the word in the text box next to 'Find,' and click Next.

Затем введите нужное слово в текстовое поле "Найти" и нажмите кнопку Найти.

I actually did research to find out the first use of the word "technology."

На самом деле, я отследил первое использование слова "технология".

And the fundamental problem is we don't actually have a word for this stuff.

Фундаментальная проблема в том, что для этого у нас слова нет.

Now, word on the street was that it was actually my volunteering that got me to the front of the line.

По слухам, именно решение стать волонтером помогло мне пробиться к началу очереди.

Previous word: Click this button to find the previous instance of a word or term in your document.

Предыдущее слово: поиск предыдущего вхождения слова или фразы в документе.

Yet all there is in the original Arabic is that one word: Houris.

В то время как в оригинале, на арабском, есть всего одно слово: гурии.

Select a suggested word from the list to replace the misspelled word.

Выберите нужное слово из списка, чтобы заменить слово с ошибкой.

Statistical improbability in the direction of good design -- "complexity" is another word for this.

Статистическую невероятность в рамках успешного создания, другими словами, его сложность.

So what we do is we give you another word, one for which the system does know the answer.

Поэтому мы даём другое слово, ответ для которого известен.

-- this time changing the mission to using spoken word poetry as a way to entertain, educate and inspire.

чтобы заинтересовать моих друзей вместе со мной заниматься устной поэзией.

Really, we have two separate concepts mapped onto the same word.

Когда движок регулярных выражений (программный модуль, реализующий поиск по регулярным выражениям) видит \b , он проверяет, что позиция в строке является границей слова.

Есть три вида позиций, которые являются границами слова:

  • Начало текста, если его первый символ \w .
  • Позиция внутри текста, если слева находится \w , а справа – не \w , или наоборот.
  • Конец текста, если его последний символ \w .

Например, регулярное выражение \bJava\b будет найдено в строке Hello, Java! , где Java – отдельное слово, но не будет найдено в строке Hello, JavaScript! .

В строке Hello, Java! следующие позиции соответствуют \b :

Так что она соответствует регулярному выражению \bHello\b , потому что:

  1. В начале строки совпадает первая проверка \b .
  2. Далее слово Hello совпадает.
  3. Далее проверка \b – снова совпадает, так как мы находимся между o и запятой.

Шаблон \bJava\b также совпадёт. Но не \bHell\b (потому что после l нет границы слова), и не Java!\b (восклицательный знак не является «символом слова» \w , поэтому после него нет границы слова).

Мы можем использовать \b не только со словами, но и с цифрами.

Например, регулярное выражение \b\d\d\b ищет отдельно стоящие двузначные числа. Другими словами, оно требует, чтобы и до и после \d\d были символы, отличные от \w , такие как пробелы или пунктуация (или начало/конец текста).

Граница слова \b не работает для алфавитов, не основанных на латинице

Проверка \b смотрит на обе стороны границы: должно быть \w с одной стороны и "не \w " – с другой.

Но \w означает латинскую букву (или цифру или знак подчёркивания), поэтому проверка не будет работать для других символов, например, кириллицы или иероглифов).

Задачи

Найдите время

Время имеет формат: часы:минуты . И часы, и минуты имеют две цифры, например, 09:00 .

Введите регулярное выражение, чтобы найти время в строке: Завтрак в 09:00 в комнате 123:456.

Word boundary ambiguity Native English speakers may at first consider tokenization to be a straightforward task, but this is not the case with designing a multilingual indexer.

Неоднозначность границ слова На первый взгляд может показаться, что токенизация является простой задачей, но это не так, особенно при разработке многоязычного индексатора.

This asserts a word boundary (This part does not actually match any characters)

Соответствует границе слова (этот элемент не соответствует какому- нибудь символу).

It is also sometimes called word boundary disambiguation, tagging, text segmentation, content analysis, text analysis, text mining, concordance generation, speech segmentation, lexing, or lexical analysis.

Синтаксический анализ иногда называют частеречной разметкой, морфологическим анализом, контент-анализом, текстовым анализом, анализом текста, генерацией согласования, сегментацией речи, лексическим анализом.

If selected, the search will only match if there is a word boundary at both ends of the string matching, meaning not an alphanumeric character - either some other visible character or a line end.

Если эта опция включена, сопоставление будет положительным только в том случае, если с обоих сторон найденной строки будут стоять разделители слов, т. е. не алфавитно- цифровые символы - любой другой отображаемый символ или конец строки.

Другие результаты

This may happen within words or across word boundaries.

Another NLP resource developed under his laboratory is Juman, a Japanese morphological parser and the first system which merged word segmentation and morphological analysis for languages which do not have explicit word boundaries (such as Japanese or Chinese).

Также в его лаборатории был разработан «Дзюман» (Juman), японский морфологический сегментатор, первая система, которая объединила в себе пословную сегментацию и морфологический анализ для языков, не имеющих чётких границ между словами (таких, как японский или, особенно, китайский).

It placed the words "the boundaries of Kuwait" between parentheses.

Yes, I know this word "boundaries" It's a line someone draws in the sand That says, "Don't cross over here to me"

Да, я знаю слово «границы» Это черта, проведенная на песке Говорящая «не подходи ко мне»

In other words, the boundaries of government action have narrowed tremendously in the face of strong financial markets, with their power to destabilize any government act deemed inconvenient.

Иными словами, возможности правительства сильно сузились на фоне мощных финансовых рынков, имеющих возможность дестабилизировать любые мероприятия правительства, которые они сочтут неудобными для себя.

In other words, the Boundary Commission itself recognizes that implementing the decision literally, is problematic but that any adjustment to correct them requires the consent of the parties, and hence dialogue between the parties.

Иными словами, сама Пограничная комиссия признает, что буквальное выполнение решения проблематично, но что любая корректировка для их устранения требует согласия сторон и, соответственно, диалога между ними.

Language-specific logic is employed to properly identify the boundaries of words, which is often the rationale for designing a parser for each language supported (or for groups of languages with similar boundary markers and syntax).

Специфичная для каждого языка логика используется, чтобы правильно распознать границы слов, что необходимо для разработки синтаксического анализатора для каждого поддерживаемого языка (или для групп языков с похожими границами и синтаксисом).

В русский word boundary означает: граница слова (мы нашли 1 переводов). Есть не менее 133 примеров предложений с word boundary . Среди прочего: This asserts a word boundary (This part does not actually match any characters ↔ Соответствует границе слова (этот элемент не соответствует какому-нибудь символу .

word boundary

переводы word boundary

граница слова

This asserts a word boundary (This part does not actually match any characters

Соответствует границе слова (этот элемент не соответствует какому-нибудь символу

Примеры

The word ‘caesura’ itself (Latin ‘section’) indicated that this was a word boundary that intersects the foot.

Само слово «цезура» (по-латыни «разрез») указывало, что это — словораздел, рассекающий стопу.

We learn to identify word boundaries despite the lack of silence.

Поэтому нам приходится учиться определять границы между словами, неL смотря на отсутствие пауз.

Word boundary and non word boundary is not supported in Emacs syntax

Символы границы слова/не слова не поддерживаются в синтаксисе Emacs

In this chapter, we ignore other machine dependencies such as the alignment of data objects on word boundaries.

В этой главе мы игнорируем машинно-зависимые вопросы, такие как выравнивание объектов данных на границу слова.

If your pattern mistakenly matches barney, you probably needed the word-boundary anchor. 3.

Если ваш шаблон ошибочно находит совпадение в bar ney, вероятно, вы забыли включить якорь границы слова. 3.

This asserts a word boundary (This part does not actually match any characters

Соответствует границе слова (этот элемент не соответствует какому-нибудь символу

Require word boundaries in both ends of a match to succeed

Соответствие должно с обеих сторон заканчиваться словами

All other characters, such as spaces, punctuation, and newline characters, are word boundaries.

Остальные символы, например пробелы, знаки пунктуации и символы перевода строки, являются границами слов.

This may happen within words or across word boundaries.

Это может происходить как внутри слова, так и на границах слов.

I'm trying to use regexes to match space-separated numbers. I can't find a precise definition of \b ("word boundary"). I had assumed that -12 would be an "integer word" (matched by \b\-?\d+\b ) but it appears that this does not work. I'd be grateful to know of ways of .

[I am using Java regexes in Java 1.6]


524k 29 29 gold badges 337 337 silver badges 436 436 bronze badges 35.7k 41 41 gold badges 146 146 silver badges 211 211 bronze badges Can you post a small example with input and expected output?

13 Answers 13

A word boundary, in most regex dialects, is a position between \w and \W (non-word char), or at the beginning or end of a string if it begins or ends (respectively) with a word character ( [0-9A-Za-z_] ).

So, in the string "-12" , it would match before the 1 or after the 2. The dash is not a word character.


95.3k 36 36 gold badges 193 193 silver badges 233 233 bronze badges 8,344 2 2 gold badges 33 33 silver badges 29 29 bronze badges Correctamundo. \b is a zero-width assertion that matches if there is \w on one side, and either there is \W on the other or the position is beginning or end of string. \w is arbitrarily defined to be "identifier" characters (alnums and underscore), not as anything especially useful for English. 100% correct. Apologies for not just commenting on yours. I hit submit before I saw your answer. for the sake of understanding, is it possible to rewrite the regex \bhello\b without using \b (using \w , \W and other)?

In the course of learning regular expression, I was really stuck in the metacharacter which is \b . I indeed didn't comprehend its meaning while I was asking myself "what it is, what it is" repetitively. After some attempts by using the website, I watch out the pink vertical dashes at the every beginning of words and at the end of words. I got it its meaning well at that time. It's now exactly word( \w )-boundary.

My view is merely to immensely understanding-oriented. Logic behind of it should be examined from another answers.

enter image description here


14.8k 2 2 gold badges 53 53 silver badges 83 83 bronze badges A very good site to understand what is a word boundary and how matches are happening

A word boundary can occur in one of three positions:

  1. Before the first character in the string, if the first character is a word character.
  2. After the last character in the string, if the last character is a word character.
  3. Between two characters in the string, where one is a word character and the other is not a word character.

Word characters are alpha-numeric; a minus sign is not. Taken from Regex Tutorial.

7,585 14 14 gold badges 48 48 silver badges 60 60 bronze badges

A word boundary is a position that is either preceded by a word character and not followed by one, or followed by a word character and not preceded by one.


70k 11 11 gold badges 89 89 silver badges 150 150 bronze badges Am I only the guy feeling like solving a puzzle as reading the answer, even after years? I was going through a minimalist phase when I wrote that.

I would like to explain Alan Moore's answer

A word boundary is a position that is either preceded by a word character and not followed by one or followed by a word character and not preceded by one.

Suppose I have a string "This is a cat, and she's awesome", and I am supposed to replace all occurrence(s) the letter 'a' only if this letter exists at the "Boundary of a word", i.e. the letter a inside 'cat' should not be replaced.

So I'll perform regex (in Python) as

re.sub(r"\ba","e", myString.strip()) //replace a with e

so the output will be

This is e cat end she's ewesome


524k 29 29 gold badges 337 337 silver badges 436 436 bronze badges


2,809 1 1 gold badge 17 17 silver badges 30 30 bronze badges

I talk about what \b -style regex boundaries actually are here.

The short story is that they’re conditional. Their behavior depends on what they’re next to.

Sometimes that isn’t what you want. See my other answer for elaboration.

75.7k 28 28 gold badges 121 121 silver badges 173 173 bronze badges

The \w stands for "word character". It always matches the ASCII characters [A-Za-z0-9_] . Notice the inclusion of the underscore and digits (but not dash!). In most flavors that support Unicode, \w includes many characters from other scripts. There is a lot of inconsistency about which characters are actually included. Letters and digits from alphabetic scripts and ideographs are generally included. Connector punctuation other than the underscore and numeric symbols that aren't digits may or may not be included. XML Schema and XPath even include all symbols in \w . But Java, JavaScript, and PCRE match only ASCII characters with \w .

Note: I'm not sure what to do about mistakes in text, like when someone doesn't put a space after a period at the end of a sentence. I allowed for it, but I'm not sure that it's necessarily the right thing to do.

Anyway, in Java, if you're searching text for the those weird-named languages, you need to replace the \b with before and after whitespace and punctuation designators. For example:

Читайте также: