Asked  7 Months ago    Answers:  5   Viewed   28 times

I am currently wondering what is the difference between the two. When I used both they seem to break the word if it is not fitting the container. But why did W3C made two ways to do it?

 Answers

54

The W3 specification that talks about these seem to suggest that word-break: break-all is for requiring a particular behaviour with CJK (Chinese, Japanese, and Korean) text, whereas word-wrap: break-word is the more general, non-CJK-aware, behaviour.

Tuesday, June 1, 2021
 
Hat
answered 7 Months ago
Hat
81

UNION removes duplicate records (where all columns in the results are the same), UNION ALL does not.

There is a performance hit when using UNION instead of UNION ALL, since the database server must do additional work to remove the duplicate rows, but usually you do not want the duplicates (especially when developing reports).

UNION Example:

SELECT 'foo' AS bar UNION SELECT 'foo' AS bar

Result:

+-----+
| bar |
+-----+
| foo |
+-----+
1 row in set (0.00 sec)

UNION ALL example:

SELECT 'foo' AS bar UNION ALL SELECT 'foo' AS bar

Result:

+-----+
| bar |
+-----+
| foo |
| foo |
+-----+
2 rows in set (0.00 sec)
Tuesday, June 1, 2021
 
aurelijusv
answered 7 Months ago
79

As Andrew said, your text should be doing just that.

There is one instance that I can think of that will behave in the manner you suggest, and that is if you have the whitespace property set.

See if you don't have the following in your CSS somewhere:

white-space: nowrap

That will cause text to continue on the same line until interrupted by a line break.

OK, my apologies, not sure if edited or added the mark-up afterwards (didn't see it at first).

The overflow-x property is what's causing the scroll bar to appear. Remove that and the div will adjust to as high as it needs to be to contain all your text.

Tuesday, June 22, 2021
 
Hugo
answered 6 Months ago
94

The CSS word-wrap: break-word; works only in display:block; or display:inline-block; elements so you can just use:

a {
  display:inline-block;
  word-wrap: break-word;
}

a {
  width:100px;
  word-wrap: break-word;
  display:inline-block;
}
<div>
  <a href="...">verylongurlherewithnospaces</a>
</div>

P.S. div are display:block; as default by user-agent.

Thursday, October 21, 2021
 
Grzegorz
answered 2 Months ago
67

To add to @abarisone's answer, the actual synset IDs themselves can differ between WordNet 3.0 and WordNet 3.1 :(

For example, in WordNet 3.1 a chair is 103005231-n.

However, in WordNet 3.0 it was 103001627-n. But you cannot look that up in http://wordnet-rdf.princeton.edu/wn31/103001627-n nor http://wordnet-rdf.princeton.edu/wn30/103001627-n, but instead you need to use http://wordnet-rdf.princeton.edu/wn30/03001627-n which incorrectly redirects to 102992974-n.

I think it's a bug in WordNet RDF 3.1 online app, because 102992974-n doesn't officially exist. You can't even search for it (both online and offline). And if you get the RDF/JSON-LD file on that page, it gives you 103005231-n.

In wn3.1.dict/dict/index.noun :

chair n 5 4 @ ~ %p + 5 2 03005231 00599171 10488547 03275941 03005700  

There's no mention of 02992974 anywhere in that file.

Both of these issues are confusing. I wonder why they changed synset IDs in minor revision.


Regarding status of WordNet synset IDs:

Conclusion is, currently, using WordNet 3.0 synset IDs is safest.

For future work, can consider using Inter-Lingual Index from Global Wordnet Association (coming soon). Which will have IDs compatible with Wordnet 3.0.

References from wn-users mailing list, 30 Oct 2015:

From: Raphael, Nicholas

The URI is built from the “dblocation” field, which is a byte offset from the beginning of the relevant character-based database file (I’m not sure which). This will change from release to release as items are removed and added and moved around.

.

From: Peter Clark

To the best of my knowledge…. FYI a little known fact is that the sense keys (e.g., “ability%1:07:00::”) are stable between releases, except when senses are split or merged. This provides a stable way to refer to synsets across releases, rather than use synset numbers. Also you can find the mappings between synset numbers in different releases by looking for the same sense keys. (sensekey->synset is a many-to-1 mapping: A synset may have multiple sense keys, one for each word+sense in the synset. But a sense key maps to exactly one synset). Best wishes, Pete

.

From: John McCrae

Hello Hendy,

Yes WordNet synset Identifiers are based on the byte offset of the descriptor in a given release of WordNet, as such they are far from stable across versions of WordNets. The sense identifiers are more stable but still can be unreliable as sense do get split and merged. Also, there are two slightly different versions of WordNet 3.1 and the WordNet RDF version accepts synset identifiers from either... this is of course, as others have commented, all very confusing.

For this reason, the Global WordNet Association has started work on an Inter-Lingual Index, which we expect to be online soon (i.e., in time for the Global WordNet Conference in January), and will give each synset a single unchanging URI.

Piek Vossen gave a good talk about this recently and this slides are online here: http://ldl2014.org/slides/Vossen-LOD-CILI.pdf

For the moment, I would recommend using WN 3.0 identifiers to link synsets, which the WordNet Interlingual Index will also be based on.

Regards, John

Tuesday, November 2, 2021
 
user3009344
answered 1 Month ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share